Content deleted Content added
→JSON Associative Array Error: new section |
|||
Line 102:
}}(See "8. Complexity: Attributes and Content")</ref>
* Transformations, even identity transforms, result in changes to format (whitespace, attribute ordering, attribute quoting, whitespace around attributes, newlines). These problems can make [[diff]]-ing the XML source very difficult except via [[Canonical XML]].
== JSON Associative Array Error ==
The JSON associative array sample - {42: true, "A to Z": [1, 2, 3]} - looks wrong to me (and also to [http://www.jsonlint.com/ JSONLint]). In JSON the property names ("keys" if you will) must be double-quoted strings. Neither numbers nor unquoted strings are valid, hence 42 cannot be a property name, although "A to Z" can, as can "42".
See [http://json.org/ JSON.org], as follows:
* An ''object'' is an unordered set of name/value <u>pairs</u>
* ''pair''
**<u>''string''</u> : ''value''
*A ''string'' is a sequence of zero or more Unicode characters, <u>wrapped in double quotes</u>
--[[User:Mikepeat|Mikepeat]] ([[User talk:Mikepeat|talk]]) 15:30, 10 January 2011 (UTC)
|