On Mon, 2009-06-08 at 11:53 +0200, Douglas Mayle wrote:
> I'd also like to point out that, as per RFC 2119, SHOULD in an RFC
> 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
> may exist valid reasons in particular circumstances to ignore a
> particular item, but the full implications must be understood and
> carefully weighed before choosing a different course.
> To my reading, for this instance, that means that parsers should not
> reject non-unique key names as invalid JSON, but that supporting them
> isn't part of the spec either. If you need to create a matched pair
> (parser and generator) that supports non-unique key names (e.g.
> serializing HTML forms), than go ahead so long as you understand that
> your JSON won't be supported consistently by any other parser...
By the same token, the fact that parsers SHOULD not reject non-unique
key names does not prevent them from doing so due to "valid reasons in
particular circumstances" - e.g., being a YAML parser :-)