There's more than one way to do things | |
PerlMonks |
Re^2: Outputting JSON with sorted names/keysby afoken (Chancellor) |
on Jan 27, 2020 at 23:35 UTC ( [id://11111953]=note: print w/replies, xml ) | Need Help?? |
... but the RFCs say that keys SHOULD be unique. On the other hand, the 2nd edition of ECMA-404 has seriously f...ed up the spec, while pretending to specify the same thing as the RFCs. See Re^4: Outputting JSON with sorted names/keys. Short, if you want to play safe, don't assume any ordering on JSON objects, and make sure all keys of an object are unique. Or clearly document that you assume other rules. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|