Introduction to JSON
JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format. Despite its name, it's language-independent and is supported by virtually every programming language.
JSON Syntax
JSON data is built on two structures:
- A collection of name/value pairs (realized as an object, dictionary, hash table, etc.)
- An ordered list of values (realized as an array, list, or sequence)
{
"name": "John Doe",
"age": 30,
"isActive": true,
"tags": ["developer", "javascript"],
"address": {
"city": "New York",
"country": "USA"
}
}
check_circle
Free Online Tool
JSON Validator
Find JSON errors instantly, right in your browser
JSON Data Types
JSON supports the following data types:
- String: "Hello World"
- Number: 42, 3.14
- Boolean: true, false
- Null: null
- Array: [1, 2, 3]
- Object: {"key": "value"}
Why Use JSON?
JSON has become the dominant data format for APIs and web services because it is easy to read and write, lightweight compared to XML, natively supported in JavaScript, and has excellent library support in all programming languages.
Conclusion
JSON is an essential skill for any developer working with web technologies. Use our free JSON Formatter to practice working with JSON data today.
Share this article: