3 ms·
That's a way. A way that, IMHO, vastly diminishes its expressive power on the reader's side, which I do not consider a very good thing. Most solutions to the is
by al_form2000 7y ago
That's a way. A way that, IMHO, vastly diminishes its expressive power on the reader's side, which I do not consider a very good thing. Most solutions to the issue are of this nature.
Consider serialized JSON already has a natural ordering, which is thrown away for some reason (probably parsing convenience).
- viraptor 7y ago> which is thrown away for some reason (probably parsing convenience). It's got nothing to do with parsing. The json comes from JavaScript syntax, where objects represent unordered mapping. Json naturally does the same. If you want expressive power for reading, json is very poor in comparison to pretty much everything else. Just use it for simple serialisation.
- al_form2000 7y agoGranted, it came from there, but that was back in the days of map=eval(json) and they're gone. There is nothing in json the format (as opposed to json the language construct) to impose the unordered behavior.(Or, for that matters, the 'no comments' bit).
- adrianmsmith 7y ago> There is nothing in json the format [..] to impose the unordered behavior That's not true. The spec at http://www.json.org/ http://www.json.org/ says "An object is an unordered set of name/value pairs".
- al_form2000 7y agoYes, that's in the specs. But what I meant is that there is nothing intrinsic to the format demanding unordered behavior.