zserge / jsmn

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

test_string problem when bracket used #39

Closed zserge closed 8 years ago

zserge commented 8 years ago

Dear, In function test_string, if js has brackets , then test fails e.g: js = "{\"strVar\" : \"hello world\"}";

Regards, Fuad


zserge commented 8 years ago

Have you also modified the test after changing the string? In your case token 0 will be the root object, token 1 - strVar, token 2 - hello world. Which of course requires test code to be adjusted (to use 3 tokens instead of 2)


Original comment by: Serge Zaitsev