6 ms·
Wrote my own JSON parser (https://github.com/MJPA/SimpleJSON https://github.com/MJPA/SimpleJSON) a while ago... not sure how it's a minefield unless I'm missing
by mjpa 10y ago
Wrote my own JSON parser (https://github.com/MJPA/SimpleJSON https://github.com/MJPA/SimpleJSON) a while ago... not sure how it's a minefield unless I'm missing something?
- valarauca1 10y agoDid you read the post? The JSON standard(s) are very simple. But in practice this simplicity leads to a lot of edge cases. Very deeply nested structures, numbers that run on to infinity. The point of this post is testing various parsers against these malicious structures. See this image: http://seriot.ch/json/pruned_results.png http://seriot.ch/json/pruned_results.png
- mjpa 10y ago"In conclusion, JSON is not a data format you can rely on blindly." - that suggests the format is bad when it's highlighting problems with the parsers. I see it like saying "Plain text is a bad format because notepad bails on large files"
- valarauca1 10y agoIn conclusion, NOUN1 is not a NOUN2 you can rely on blindly This is true for everything. I don't see why this is evidence of anything. If you rely on any system blindly you are doing something wrong.
- SloopJon 10y agoPerhaps you'd be interested to know that your JSONDemo program fails the following tests: hang: y_number_huge_exp.json segfault: n_structure_100000_opening_arrays.json n_structure_open_array_object.json fail: n_number_then_00.json n_string_unescaped_tab.json n_structure_capitalized_True.json
- mjpa 10y agoI would :) Was going to run the tests myself later but needed a box with python3 on it!