In JSON, values must be one of the following six data types. Any other data (like functions, variables, or dates) will make the JSON invalid.
Explore the valid types and how they are written in JSON syntax:
Must be in double quotes.
"name": "Hridoy"
Integer or decimal.
"age": 25
Nested key-value pairs.
{"city": "Dhaka"}
A list of JSON values.
["HTML", "JS"]
True or False.
"active": true
Empty value.
"middle": null
Strings in JSON must be wrapped in double quotes " ". Single quotes are not allowed.
{"name": "RedoHub"}
Numbers in JSON must be an integer or a floating point. They should not be wrapped in quotes.
{"price": 19.99, "count": 100}
Values in JSON can be other JSON objects. This allows for deep nesting.
{
"user": {
"id": 1,
"login": "admin"
}
}
Values in JSON can be arrays. An array in JSON can contain strings, numbers, objects, or even other arrays.
{"tags": ["Web", "Dev", "Learning"]}
"2026-04-18".
Standard JSON does not support:
null instead.