JSON: Difference between revisions
m
Correction & addition
m (Typo) |
m (Correction & addition) |
||
Line 49: | Line 49: | ||
*'''Arrays''', which are enclosed in '''[''' ... ''']''' characters and are made up of values separated by commas: <font color="blue">[5, "Mike", false, 14.70912, null, -5.34108e9]</font> | *'''Arrays''', which are enclosed in '''[''' ... ''']''' characters and are made up of values separated by commas: <font color="blue">[5, "Mike", false, 14.70912, null, -5.34108e9]</font> | ||
Whitespace is irrelevant <u>outside</u> of | Whitespace is irrelevant <u>outside</u> of double-quotes (although both names and string values may contain whitespace). Because of this, JSON may be formatted for easier human-readability (''prettified'') with spaces and line breaks: | ||
<font color="blue">{ | <font color="blue">{ | ||
Line 65: | Line 65: | ||
"test scores": [56, 87, 19, 11, 70, 64] | "test scores": [56, 87, 19, 11, 70, 64] | ||
}</font> | }</font> | ||
Which is the same, from a machine standpoint, as the rather less human-readable: | |||
<font color="blue">{"first name":"Mike","last name":"Peat","age":21,"is male":true,"salary":null,"address":{"house":22,"street":"Acacia Avenue","town":"Dullsville","county":"Midhamptonshire"},"test scores":[56,87,19,11,70,64]}</font>. | |||
==JSON in DataFlex== | ==JSON in DataFlex== |