3 ms·
it seems to allow duplicate keys but drops all but one. I have no idea if this is correct since the JSON spec doesn't really cover it. personally I think the sp
by hp 15y ago
it seems to allow duplicate keys but drops all but one. I have no idea if this is correct since the JSON spec doesn't really cover it. personally I think the spec should ban it because it means you need to parse the closing brace for an object before you know you have the right value for any field. also it means you need to keep a dictionary-like representation in memory to detect the dups, a list or stream of pairs wouldn't consolidate dups.
a nitpick for sure but several times I've wished the JSON spec had something to say here.