4 ms·
> The core idea is: many serializations, one underlying data structure/object graph. Then why is UTF-8 even mentioned? Or time zone offsets, for that matter?
by colanderman 10y ago
> The core idea is: many serializations, one underlying data structure/object graph.
Then why is UTF-8 even mentioned? Or time zone offsets, for that matter?
- bascule 10y agoSo it's possible to specify a rigorous set of tests cases that, ideally if all are passed, can be used to certify a conforming implementation. In other words, to solve this problem: http://seriot.ch/parsing_json.php http://seriot.ch/parsing_json.php While in some cases it might make sense to relax some of the requirements, I'm a fan of keeping things simple. Call me one of those crazy people who thinks Postel's Law is wrong. TJSON specifies a set of test cases for this purpose here: https://raw.githubusercontent.com/tjson/tjson-spec/master/draft-tjson-examples.txt https://raw.githubusercontent.com/tjson/tjson-spec/master/dr... I prefer to specify things in such a way that it's relatively easy to specify a test suite that covers all of the corner cases. A secondary goal of TJSON is to produce a stricter format, so I'd prefer to start with additional strictness requirements, and relax them if a reasonable case can be made.