Skip to content

What are the basic data types in JSON?

The basic data types in JSON are referred to as values.

Strings

Text enclosed in double-quotation marks.

Example

"example"

Numbers

  • Integer (whole) or decimal
  • Positive or negative
  • Zero
  • No quotation marks

Example

[1, 2.5, 0, 382]

Booleans

  • True or false
  • No quotation marks

Example

[true, false, false, true]

Null

  • Means "nothing"
  • No quotation marks

Example

[null]

Sources