Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From 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."


Yes, 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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: