Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing when parsing double quotes inside a string which are followed by a Comma #129

Open
itinance opened this issue Jun 22, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@itinance
Copy link

I discovered an output made by Claude 3 API, that can't get repaired by this tool:

{
  "id": "251115",
  "category": "Politics",
  "reason": "The headline discusses a city's policy to become an "Airbnb-free zone", which is a political decision."
}

It won't fix the double quotes inside the string maybe due to the comma following after the second double quote in an "Airbnb-free zone", which

@josdejong
Copy link
Owner

That one is indeed hard to fix, but it would be nice of course to improve on this.

Help would be very welcome!

@ayqy
Copy link

ayqy commented Nov 5, 2024

The same issue here, maybe another json schema param can solve a part of cases, eg.
repair(thisBadJSON, { id: "number", category: "string", reason: "string" })

@josdejong
Copy link
Owner

Interesting idea @ayqy to use knowledge from a SJON Schema. I think that would require a rebuild of the library but it is an interesting thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants