Is this valid JSON?
{
"a" : [
"x",
"x"
]
}
http://jsonlint.com/ says yes.
http://www.json.org/ doesn't say anything about it being forbidden, but does say:
JSON is built on two structures:
A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
"An ordered list of values" suggests duplicates are therefore valid. Is this correct? Is there anything more explicit? Are there any JSON implementation which don't allow duplicate values?
(Here's the related question about duplicate keys.)