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

Introduce additional helpers for getting tokens/total size #166

Open maximmenshikov opened 5 years ago

maximmenshikov commented 5 years ago

jsmn requires a lot of manual work in each project to actually start working with JSON. I've added API to: 1) get total number of tokens consumed by token and its children 2) get token with a given key (in objects) 3) get token by index (in array)

This API is pretty much enough for use in real projects, in my opinion. Covered by unit tests.