JSON
Data Types
The seven JSON value types.
By EZ4Code Team
data-typessyntax
Code
{
"string": "hello",
"number": 42,
"float": 3.14,
"boolean": true,
"nullValue": null,
"array": [1, 2, 3],
"object": { "nested": "value" }
}Explanation
JSON supports exactly seven value types: string, number, boolean, null, array, object, and the top-level document itself. Strings must use double quotes, and trailing commas are not permitted. Numbers cannot be NaN or Infinity, and keys must always be strings.
More JSON Snippets
Nested Objects
Objects within objects for hierarchical data.
Arrays
Lists of mixed and homogeneous values.
Schema Validation
Validate structure with JSON Schema.
JSONPath
Query expressions for locating nodes.
Merge Patch (RFC 7386)
Partially update JSON documents.
JSON Pointer (RFC 6901)
Address a specific value by path.