JSONのキーと値のペアの順序に頼ることはできません。たとえば、JSONパーサーは法的にJSON配列の順序に頼ることはできますか?
{
"anotherKey" : "anotherValue",
"someKey" : "someValue",
"evenAnotherKey" : "evenAnotherValue"
}
として
{
"someKey" : "someValue",
"anotherKey" : "anotherValue",
"evenAnotherKey" : "evenAnotherValue"
}
を解釈することができますが、私はJSON 配列の順序に依存しているだろうか?たとえば、JSONパーサーは法的に
{
"arrayKey" : ["secondElement", "firstElement1", "thirdElement"]
}
として
{
"arrayKey" : ["firstElement", "secondElement", "thirdElement"]
}
を解釈するだろうか?私はそうは思わないだろうが、私の友人は私が間違っていたと私に言った。
あなたはJSON配列について尋ねますが、JavaScriptコンパイラについて話します。あなたはJSONやJavaScriptを扱っていますか? – Quentin
@Quentin私はパーサーを意味しました。私は質問を編集します。 – Bennett