3 ms·
Anyone know how this compares with jsmn? https://github.com/zserge/jsmn https://github.com/zserge/jsmn
by RustyRussell 5y ago
Anyone know how this compares with jsmn? https://github.com/zserge/jsmn https://github.com/zserge/jsmn
- rurban 5y agoYes. jsmn is ultra light weight, this is not. This creates json, can emit json structurally, and parses json. You don't really need to emit json, printf in some macros is usually enough. This parser is heavy, creating copies. But it's much easier to use than jsmn. jsmn needs two loops and special handling of the various types. There's no high-level API to get the values of an array nested in an object. CJson has it, at the cost of copies and 2x memory and slowness.