[eeps] JSON

Paul Davis paul.joseph.davis@REDACTED
Tue Jul 5 03:14:21 CEST 2011


On Mon, Jul 4, 2011 at 8:24 PM, Richard O'Keefe <ok@REDACTED> wrote:
> We were having a debate about the best way to handle duplicate keys
> in JSON, and I quoted the sentence from RFC 4627 section 2.2 where
> it says
>        The names within an object SHOULD be unique.
>
> I asked Douglas Crockford, the author of the RFC, about this, and
> his reply was
>
>        The RFC SHOULD have said MUST.
>
> That is, the intention of the RFC is that JSON data should never
> include duplicate keys, so it really should not matter much what
> we do when parsing such data.
>
> Now comes the practical question:  how often does this _actually_
> occur?
>
>
> _______________________________________________
> eeps mailing list
> eeps@REDACTED
> http://erlang.org/mailman/listinfo/eeps
>

I can only say that I've never seen a case of this in real life, but
then again it'd take a very peculiar configuration to trigger a bug
since mochijson2 allows duplicates.

That said, I've also never seen unquoted keys or comments, but other
people seem to think they exist.



More information about the eeps mailing list