Datatypes in JSON

Now, let us take a look at a more complex example of JSON. We'll also go over all the datatypes that are supported by JSON. JSON supports six datatypes: strings, numbers, Booleans, arrays, objects, and null.

Datatypes in JSON

In the preceding example, we have five key-value pairs of different datatypes. Now let us take a close look at each of these key-value pairs:

Datatypes in JSON

The datatype of the value that "id" references is a number.

Datatypes in JSON

Here, the datatype of the value ...

Get JavaScript and JSON Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.