-
Notifications
You must be signed in to change notification settings - Fork 784
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
Should allow primitive at root to comply RFC #102
base: master
Are you sure you want to change the base?
Conversation
at some point it will be fixed |
I rebased the test to https://github.com/zserge/jsmn , it resulted the following error |
Don't worry, I'm slowly building a list of things that need to be added/changed/improved in the parses without breaking it. If all goes well and I have enough time I might push fix for that in at most a month or so. |
although it should work without strict I believe... hmmm |
test/tests.c
Outdated
const char *js; | ||
js = "\"hello\""; | ||
check(parse(js, 1, 1, | ||
JSMN_STRING, "hello")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For JSMN_STRING parse() expects 2 arguments, second being size, as in number of children. Just needs a 0 as argument after "hello".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! fixed it on the branch.
Current jsmn disallows only a primitive at root. But RFC7159 allows that like followings:
So I think it should allow this even in JSMN_STRICT case.