JSON Data Types
A list of all JSON data types, with a description of each one.
A JSON value can be one of six data types:
These data types are described below.
|String||Any sequence of Unicode code points, inserted between
Represented in base 10 with no superfluous leading zero. Can include digits between 0 and 9.
It can be a negative number (e.g.
|Boolean||This can be either
A JSON object is an unordered set of name/value pairs inserted between
An object can contain zero or more name/value pairs. Multiple name/value pairs are separated by a
A JSON array is an ordered collection of values. It allows you to provide a list of values.
A JSON array begins with
When working with strings, certain characters need to be escaped with a
For example, to use a
" (double quote) within a string, you'll need to escape it. Otherwise any application reading it will think that your double quote marks the end of the string, and cut it short. This will effectively break your data import, as the application tries to interpret the rest of the string.
Here's a list outlining the characters that need to be escaped in a JSON file.
|Character||Unicode Name/Code Point||Use this to escape it|
|"||Quotation mark (U+0022 )||
|\||Reverse solidus (U+005C )||
|/||Solidus (U+002F )||
|Backspace (U+0008 )||
|Form feed (U+000C )||
|Line feed (U+000A )||
|Carriage return (U+000D )||
|Horizontal tab (U+0009 )||
You can also use the hexadecimal equivalent to escape a character. For example, you could use
\u002F) to represent the solidus character.