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
- Documenting APIs: A guide for technical writers and engineers by Tom Johnson
- Learn API Technical Writing: JSON and XML for Writers by Peter Gruenbaum
- JSON.org
- Data Base Camp