Open miloyip opened 8 years ago
Thanks! I see that jsmn was running in a non-strict mode during the tests. I wonder if adding #define JSMN_STRICT
changes things... It should then report errors on unquoted keys, missing or extra commas and so on.
By default JSMN_STRICT is not defined, because jsmn is targeted for low-end embedded systems and to keep the parser ultra small and fast we don't check for most of the errors, as long as they don't break the parser.
Thanks. I have added the macro and updated the report. The parse validation results have improved:
- Summary: 11 of 34 are correct.
+ Summary: 18 of 34 are correct.
https://github.com/miloyip/nativejson-benchmark/blob/master/sample/conformance_jsmn%20(C).md