JSON Data Types

JSON format supports the following data types:

  • Number
  • String
  • Array
  • Object
  • Boolean
  • NULL

JSON Number

In JSON, Number must be integer or a floating point.


JSON String

In JSON, String must be in double quotes "".

{"name":"Saarthak Singh"}

JSON Object

In JSON, Values can be objects.

{"name":"Saarthak Singh", "age":10, "Country":"India"}

JSON Arrays

Values in JSON can be arrays.

{"name":["Saarthak Singh", "Vijay Singh"]}

JSON Booleans

Values in JSON can be true/false.



Values in JSON can be null.