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

Invalid JSON format treated as valid #73

Open
mihaipogonaru opened this issue Jul 27, 2018 · 2 comments
Open

Invalid JSON format treated as valid #73

mihaipogonaru opened this issue Jul 27, 2018 · 2 comments
Milestone

Comments

@mihaipogonaru
Copy link

The parser doesn't check for the case when there is a ',' followed by nothing so strings like "[1,]" , '{"a":1,}' pass as valid JSONs

@LB--
Copy link
Member

LB-- commented Aug 7, 2021

I believe this is intentional, though if it's really a problem perhaps a parser flag could be added for it?

@LB-- LB-- added this to the v1.2.0 milestone Aug 14, 2021
@DimitriPapadopoulos
Copy link
Contributor

DimitriPapadopoulos commented Nov 6, 2021

Indeed, this is not a JSON validator. This is a JSON parser. Parsers tend to be more lenient. Why is this a problem?

https://stackoverflow.com/questions/201782/can-you-use-a-trailing-comma-in-a-json-object#11495287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants