Monday, February 23, 2015

JSON Data Types

Number{ "myNum": 123.456 }
A series of numbers; decimals ok; double-precision floating-point format.
String{ "myString": "abcdef" }
A series of characters (letters, numbers, or symbols); double-quoted UTF-8 with backslash escaping.
Boolean{ "myBool": true }
True or false.
Array{ "myArray": [ "a", "b", "c", "d" ] }
Sequence of comma-separated values (any data type); enclosed in square brackets.
Object{ "myObject": { "id": 7 } };
Unordered collection of comma-separated key/value pairs; enclosed in curly braces; properties (keys) are distinct strings.
Null{ "myNull": null }
Variable with null (empty) value.

No comments:

Post a Comment