GENWiki

Premier IT Outsourcing and Support Services within the UK

User Tools

Site Tools


computerfaq:json

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

computerfaq:json [2022/10/17 11:34] – created genadmincomputerfaq:json [2023/01/06 07:54] (current) genadmin
Line 22: Line 22:
 }</code> }</code>
  
-JSON doesn’t have to have only key:value pairs; the specification allows to any value to be passed without key. Howeveralmost all of the JSON objects that you see will contain key:value pairs+JSON doesn’t have to have only key:value pairs; the specification allows for list or array which is enclosed in square braces such as: 
 + 
 +<code javascript [enable_line_numbers="true"]> 
 +["red","green","blue"
 +</code> 
 + 
 +The square braces indicate an array or list, in this case {"red","green","blue"} is invalid because the { } indicate a key/value pair, but [ ] indicate a list or array. You can have a list as a value as shown in the example two above
  
 To be valid, there must be a matching set of } for every { and ] for every [ , and elements must be comma separated and types must be correctly quoted.  To be valid, there must be a matching set of } for every { and ] for every [ , and elements must be comma separated and types must be correctly quoted. 
/home/gen.uk/domains/wiki.gen.uk/public_html/data/attic/computerfaq/json.1666006493.txt.gz · Last modified: 2022/10/17 11:34 by genadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki