April 2018
Beginner
226 pages
4h 47m
English
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 data types: strings, numbers, Booleans, arrays, objects, and null:
{ "studentid" : 101, "firstname" : "John", "lastname" : "Doe", "isStudent" : true, "scores" : [40, 50], "courses" : { "major" : "Finance", "minor" : "Marketing" }}
In the preceding example, we have key-value pairs of different data types. Now let us take a close look at each of these key-value pairs.
The datatype of the value that "studentid" references is a number:
"studentid" : 101,
The datatype of the value that "firstname" references is a string:
"firstname" : "John",
In the following snippet, the datatype of ...
Read now
Unlock full access