JSON Formatter and Validator

JSON Syntax Reference

Overview

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write, and easy for machines to parse and generate.

Data Types

JSON supports the following data types: string, number, object, array, boolean, and null.

Syntax Rules

- Data is in name/value pairs.
- Data is separated by commas.
- Curly braces hold objects.
- Square brackets hold arrays.

Examples

Here is a basic example of a JSON object:

{
  "name": "John",
  "age": 30,
  "isStudent": false,
  "courses": ["Math", "Science"],
  "address": {
    "city": "New York",
    "zipcode": "10001"
  }
}

Usage

JSON is commonly used for transmitting data in web applications between a server and a client. It is also used for configuration files and data storage in various applications.