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 parsed as valid #158

Open
Karhenpl opened this issue Jun 5, 2019 · 2 comments · May be fixed by #194 or #197
Open

Invalid JSON parsed as valid #158

Karhenpl opened this issue Jun 5, 2019 · 2 comments · May be fixed by #194 or #197
Labels

Comments

@Karhenpl
Copy link

Karhenpl commented Jun 5, 2019

in JSMN_STRICT mode, jsmn_parse function returns > 0 value but following strings should be invalid:
{ "a": } --> 2
{ "a"} --> 2
{"a" "b"} --> 3
{"a" :::::: "b"} --> 3
{"a" : [1 "b"]} --> 5
{"a"""} --> 3
{"a":1""} --> 3
{"a":1"b":1} --> 3

@pt300 pt300 added the bug label Jun 5, 2019
@pt300
Copy link
Collaborator

pt300 commented Jun 5, 2019

Will fix as this library gets a bit of rework. Right now I'm busy with life matter. Sorry

@z1617
Copy link

z1617 commented May 10, 2020

{}{} is also valid --> pos=4 toknext=2 toksuper=-1 r=2

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