What is JSON and why does it appear in almost all APIs?

Published on 2026-10-20 by frfrand

JSON explained for beginners: objects, lists, strings, numbers, real example of an API and errors that prevent it from being read correctly.

What is JSON and why does it appear in almost all APIs?

Short answer: JSON is a text format for representing structured information that programs written in different languages can exchange. It is called JavaScript Object Notation, but it also works for Python, Java, Go, mobile applications, and practically any modern environment.

If you ever opened an API and found braces, quotes, and colons, you were probably looking at JSON. The syntax seems strange until you understand that it only describes data.

A simple example from a store

{
  "id": 42,
  "nombre": "Teclado mecánico",
  "precio": 79.90,
  "disponible": true,
  "categorias": ["accesorios", "teclados"]
}

The words on the left are keys; on the right appears their value. Braces contain an object, brackets contain a list, and quotes indicate text. There is no instruction that executes just by writing it.

What types of values exist?

JSON supports text strings, numbers, booleans true and false, the value null, arrays, and objects. You can combine lists and objects to represent more complex information.

It does not support functions, comments, or dates as a special type. A date can be transmitted as text following an agreed format, but the application must interpret it.

Why do APIs use it so much?

Imagine a React frontend that needs to display products stored in a Django backend. Both can agree to exchange a JSON list. The server returns data; the frontend decides how to draw them.

JSON is common in HTTP, but that does not mean an API is required to use it. There are services that exchange XML, binary data, or other formats. HTTP transports messages; JSON describes a possible representation of the data.

JSON is not a database

You can save a .json file on your disk, but that does not turn it into PostgreSQL. A database engine manages queries, transactions, concurrency, storage, and other problems that the format does not solve.

There are also databases that store JSON documents. There, the format is part of how records are represented, but the engine is still another piece.

Errors that appear constantly

Using single quotes. In standard JSON, keys and strings must use double quotes.

Leaving a trailing comma. This produces invalid syntax: {"nombre":"Ana",}. Some languages allow that style in their own objects, JSON does not.

Adding comments. A line starting with // is not valid within pure JSON, although certain variants accept it.

Confusing number and text. 42 is not the same as "42". And null is not equivalent to "null" either.

How a programmer uses it

In JavaScript, JSON.parse transforms a valid JSON string into a language value; JSON.stringify converts compatible values to JSON text. In Python you can use the standard json module.

But there is an important detail: well-written JSON does not mean reliable data. If {"admin":true} arrives from the browser, the server should not grant administrative privileges just because the key exists and has valid syntax.

And in ArduMaker?

The ArduMaker API and its MCP server respond in JSON: when an AI agent lists your VPS or installs an app, what it receives is an object with fields such as id, status or operacion_id. Understanding JSON helps interpret those responses, build integrations and diagnose errors without confusing the format with the operation executed by the server.

And the rule from the previous section applies: ArduMaker's MCP marks text written by third parties (emails, logs, comments) as untrusted, so that a well-formed JSON is not confused with a command.

In summary: JSON is a grammar for writing data. Understanding objects, arrays and value types allows you to understand many API responses without learning an entire programming language.

Frequently asked questions

How do I check if a JSON is valid?

With any parser. In the terminal, python3 -m json.tool archivo.json or jq . archivo.json show the formatted content or the error and its position. To also validate the expected structure (which fields are required and of what type) JSON Schema is used.

JSON or YAML?

JSON is the usual format for two programs to exchange data via an API. YAML is widely used for configuration files written by people, because it supports comments and is easier to read, but its indentation-based syntax also leaves more room for subtle errors.

Sources: JSON Specification, RFC 8259 · MDN JSON Reference · What is an API.

What is JSON and why does it appear in almost all APIs?
  • JSON
  • API
  • programación
  • backend

Keep reading

All articles · VPS plans