What is json
Last updated: April 1, 2026
Key Facts
- JSON uses curly braces {} for objects and square brackets [] for arrays to organize data
- It supports strings, numbers, booleans, null, arrays, and objects as data types
- JSON is language-independent and can be used with all modern programming languages
- The file extension is .json and MIME type is application/json
- JSON is widely used for APIs, configuration files, and data interchange between servers and clients
Overview
JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that has become the standard for exchanging data on the web. It was created as a simpler alternative to XML and is now used across virtually all modern web applications, APIs, and data storage systems.
Core Structure
JSON data is organized using two fundamental structures: objects (enclosed in curly braces {}) and arrays (enclosed in square brackets []). Objects contain key-value pairs where keys must be strings enclosed in double quotes, followed by a colon and the value. Arrays are ordered collections of values separated by commas.
Data Types
JSON supports six primary data types:
- String - Text enclosed in double quotes
- Number - Integer or floating-point values
- Boolean - True or false values
- Null - Represents empty or no value
- Object - Unordered collection of key-value pairs
- Array - Ordered list of values
Why JSON is Popular
JSON has become the de facto standard for data interchange because it is human-readable, compact, and easy to parse. Unlike XML, which uses verbose tags, JSON requires minimal syntax overhead while maintaining clarity. It loads and processes faster, uses less bandwidth, and is natively supported in JavaScript while being fully compatible with all other programming languages.
Common Uses
JSON is extensively used for REST APIs where servers send data to clients, storing configuration files for applications, saving user preferences and settings, exchanging data between microservices, and NoSQL databases like MongoDB that store data in JSON-like formats. Most modern web applications rely on JSON for their core data operations.
Related Questions
What is the difference between JSON and XML?
JSON is more compact and faster to parse than XML, with simpler syntax and smaller file sizes. XML uses verbose tags while JSON uses key-value pairs. JSON is preferred for APIs and web applications, while XML is still used in enterprise systems and document storage.
How do I parse JSON in different programming languages?
Most languages have built-in JSON parsing libraries. JavaScript uses JSON.parse(), Python uses json.loads(), Java uses Jackson or Gson libraries, and C# uses JsonConvert. Parsing converts JSON text into usable data structures.
What makes JSON valid or invalid?
Valid JSON requires proper syntax including quoted keys, correct data types, no trailing commas, proper nesting, and closed braces/brackets. Common errors include unquoted keys, single quotes instead of double quotes, and missing commas between elements.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- JSON Official WebsiteCC0-1.0
- Wikipedia - JSONCC-BY-SA-4.0