Closed ahhardin closed 4 months ago
Thanks for reporting the issue, give a spin to 0.24.0
and let me know if it works
Oh wow! First of all you are an absolute legend for this! It works perfectly for that case. Now that this issue is fixed I found one more 😅 , I can put it here but lmk if you want me to open a new issue and I can also do that (I do not want to be greedy I am already ecstatic that you fixed the first issue):
I also get errors when there's no opening OR closing quote but there are commas in the value (but not between the k-v pairs, sadly):
[
{
"Snippet Summary Id": 1,
"Overview": "Transition from company 1 to company 2",
"Description": The conversation touches on a customer who moved from company 1 to company 2 and encountered some challenges with the employment of record services. This highlights a particular area of scrutiny from the prospect's perspective.
"What the Prospect said": Marie mentions a customer who transitioned from company 1 to company 2. This customer praised company 2 but raised an issue concerning the employment of record services, specifically related to contractual obligations and compensation adjustments.
"Seller Response": Alex acknowledges the comment and prepares to proceed with the meeting by introducing more participants into the room.
"Quote": "They came over from company 1... she dropped a flag on me."
}
]
parses into:
[
{
"Snippet Summary Id": 1,
"Overview": "Transition from company 1 to company 2",
"Description": "The conversation touches on a customer who moved from company 1 to company 2 and encountered some challenges with the employment of record services. This highlights a particular area of scrutiny from the prospect's perspective.\n \"What the Prospect said",
"Seller Response": "Alex acknowledges the comment and prepares to proceed with the meeting by introducing more participants into the room.\n \"Quote\": \"They came over from company 1... she dropped a flag on me."
}
]
but I want:
[
{
"Snippet Summary Id": 1,
"Overview": "Transition from company 1 to company 2",
"Description": "The conversation touches on a customer who moved from company 1 to company 2 and encountered some challenges with the employment of record services. This highlights a particular area of scrutiny from the prospect's perspective.",
"What the Prospect said": "Marie mentions a customer who transitioned from company 1 to company 2. This customer praised company 2 but raised an issue concerning the employment of record services, specifically related to contractual obligations and compensation adjustments.",
"Seller Response": "Alex acknowledges the comment and prepares to proceed with the meeting by introducing more participants into the room.",
"Quote": "They came over from company 1... she dropped a flag on me."
}
]
There are also no commas here between the k-v pairs so this whole thing is kind of a mess.
Thanks again for the 0.24.0 fix, you're incredible!!
No worries about opening a new issue, I have released 0.25.0 that should fix this case more generally
Works perfectly 🏆 thank you so much!!
Version of the library
0.23.1
Describe the bug
When parsing broken json that looks like this:
The missing quote after
"Description":
is repaired but instead of closing the quote at the existing closing quote, the package inserts a new quote at the first comma it finds, resulting in this:How to reproduce
Expected behavior
I'd expect this:
Overall this is an awesome tool!! It's handled everything else I've thrown at it perfectly.