Programming words

What is JSON?

JSON is simple text that programs use to pass data to each other. It has a key and a value.

  • Text is inside quotes. A number has no quotes.
  • A list is written with [ ], and a pair with { }.
  • A weather or exchange-rate answer is often JSON.

{"city":"Baku"} is one pair. The key is city, the value is Baku. If a comma is missing, the program rejects the text. JSON does not draw the page. It only carries the data.

Tool for this topic

Related guides

About this tool

JSON (JavaScript Object Notation) is a simple text format used by programs to exchange data. It relies on key-value pairs, where text is enclosed in quotes and numbers remain unquoted. Data is grouped using curly braces { }, while lists are represented by square brackets [ ]. This structure allows different systems to communicate effectively by sharing information in a standardized, machine-readable text format.

Developers use JSON when they need to transmit data between a server and a web application. For instance, weather updates or exchange rate data are frequently delivered in this format. JSON does not handle page styling or layout; its sole purpose is to carry data. Because the format is strict, missing a single comma will cause the program to reject the entire data set.

How to use it

  1. Define your data using key-value pairs.
  2. Enclose text values within double quotes.
  3. Group your data using curly braces { }.
  4. Separate items with commas and verify the syntax.

Common uses

Frequently asked questions

What is the primary purpose of JSON?

The primary purpose of JSON is to facilitate data exchange between programs. It provides a lightweight way to transmit structured information that both servers and clients can easily parse.

Why is syntax strict in JSON?

JSON syntax is strict because programs require precise formatting to interpret data correctly. If a comma or bracket is missing, the parser cannot read the structure, leading to an error.

Does JSON control how a page looks?

No, JSON does not control the visual appearance of a page. It is strictly a data-carrying format. Styling and layout are handled by other technologies like HTML and CSS.