zserge / jsmn

Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
MIT License
3.72k stars 783 forks source link

[Bug] JSMN does no find the token of a valid JSON string #165

Closed ngreve closed 4 years ago

ngreve commented 5 years ago

When using a JSON string like {"input":22}, JSMN does not find the token with its value, even though it's a valid JSON String. JSMN needs spaces around the integer value like {"input": 22 }. The first string, without spaces, should work too.

pt300 commented 5 years ago

I am unable to reproduce this

the-mush commented 5 years ago

do you have a way to check if JSMN is getting an ASCII space character (value 32 in decimal)? Maybe it's getting a UNICODE encoded space character and I think it only works with ASCII (which would convert the space character into multiple characters, something like U0020b).