JSON Basics
Learn the fundamentals of JSON syntax and structure
Basic JSON Structure
{
"string": "Hello, World!",
"number": 42,
"boolean": true,
"null": null,
"array": [1, 2, 3, 4, 5],
"object": {
"name": "John Doe",
"age": 30,
"email": "john@example.com"
}
}
JSON supports six data types: strings, numbers, booleans, null, arrays, and objects.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate.
Why Use JSON?
- Language Independent: JSON can be used with any programming language
- Human Readable: Easy to read and understand
- Compact: Minimal syntax overhead
- Widely Supported: Native support in most programming languages