3 ms·
From https://www.ecma-international.org/ecma-262/5.1/#sec-15.12 https://www.ecma-international.org/ecma-262/5.1/#sec-15.12 -- "NOTE: In the case where there are
by sratner 9y ago
From https://www.ecma-international.org/ecma-262/5.1/#sec-15.12 https://www.ecma-international.org/ecma-262/5.1/#sec-15.12 -- "NOTE: In the case where there are duplicate name Strings within an object, lexically preceding values for the same key shall be overwritten."
- Zalastax 9y agoYes, a good point! For interoperability it would be best if everyone followed the ECMA standard for JSON from 2011. It seems like they forgot to even mention duplicate keys in ECMA-404 from 2013 which seems very strange. RFC7159 uses the word SHOULD but I don't think the JSON parser Jiffy has actually understood the full implications and carefully weighed before choosing to allow duplicate elements.