4 ms·
Well it claims to do validation. I think it perhaps doesn’t fully build json values into fast-to-access data structures but I don’t think this is unique amongs
by dan-robertson 6y ago
Well it claims to do validation.
I think it perhaps doesn’t fully build json values into fast-to-access data structures but I don’t think this is unique amongst fast json parsers, or indeed necessary.
It seems reasonably believable that it could maintain high throughput if it has minimal setup and keeps everything linear.
- rightbyte 6y agoI tested it and it seems to do validation before access. The lib doesn't do double keys properly though, and returns the first result instead of the last. If you don't scan to the end each time at look-up and do no expensive hash map-backed tree I understand why it is faster at parsing ...
- jsnell 6y agoWhat do you mean by "properly"? The original json.org "spec" is silent on the matter of non-unique keys, and RFC 7159 says: > When the names within an object are not unique, the behavior of software that receives such an object is unpredictable.
- rightbyte 6y agoOh, in that case it is fine then. I vaguely remembered that it had to have the last value according to the specification when keys are duplicate. I meant "properly" as in "according to the JSON specification". The lib is really nice to use from 5 minutes of testing.
- deleted 6y ago[deleted]