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

Website example uses missing type jsmnerr_t #64

Closed monkbroc closed 8 years ago

monkbroc commented 8 years ago

http://zserge.com/jsmn.html has this example

jsmntok_t tokens[256];
const char *js;
jsmnerr_t r;

js = ...;
r = jsmn_parse(&parser, js, tokens, 256);

jsmnerr_t is not a type in jsmn.h. jsmn_parse actually returns int.

In addition jsmn_parse needs the length of js as a 3rd argument.

Could you please update the website to reflect this?

Thanks for the neat library :+1:

zserge commented 8 years ago

Thanks, fixed!