Agentic Research

JSON (JavaScript Object Notation)

Also: json 格式 · json 檔案 · json file · javascript object notation

A lightweight data format in plain text that both humans and programs can read — the common language of AI tooling.

When you will meet it

The request you send an LLM API is JSON, the response is JSON, the tool calls a model returns are JSON, and most AI config files are JSON too. Its rules are few but utterly unforgiving: one missing quote or trailing comma rejects the whole payload, and the error often hands you only a line and column to hunt with.

An analogy

Like a fill-in form: fields (keys) paired with contents (values) in a fixed layout, so whoever receives it can process it mechanically. JSON is programming's most popular form template — simple enough that even a language model can fill it in reliably.

Minimal example

echo '{ "model": "demo", "temperature": 0.7, "tags": ["a", "b"] }' | python3 -m json.tool

python3 -m json.tool is JSON's X-ray machine: valid JSON comes back pretty-printed; broken JSON reports the line and column. Run any suspect config file or API payload through it before hunting by eye.

What people get wrong

  • Single quotes, a comma after the last item, or comments — all everyday JavaScript, all banned in JSON. "Almost-JSON" config files are a beginner hot zone.
  • Assuming a .json extension guarantees valid JSON inside. Hand-edited files pick up invisible characters, and some tools' "JSON" actually tolerates comments (JSONC). When in doubt, validate with a tool instead of your eyes.

Related terms

Next