JSON Data Types
Data Type | Example | Description |
---|---|---|
String | “name”: “Raj” | Represents textual data enclosed in double quotes. |
Number | “age”: 30 | Represents numeric values (integer or floating-point). |
Boolean | “isStudent”: false | Represents true or false values. |
Array | “courses”: [“Math”, “Science”] | Ordered collection of values enclosed in square brackets. |
Object | “address”: { “city”: “New York”, “zipcode”: “10001” } |
Unordered collection of key-value pairs enclosed in curly braces. |
Null | “description”: null | Represents an empty or undefined value. |
What is JSON
JSON, short for JavaScript Object Notation, is a lightweight data-interchange format used for transmitting and storing data. It has become a standard format for web-based APIs due to its simplicity and ease of use.