freecoding.school100% FREE · NO SIGNUP
Endpoint BayISSUE #10 of 45

json · the lingua franca

RestaVSThe 401 Bandit
Resta saysJSON is the dominant API data format — lightweight, human-readable, native to JavaScript.

JSON (JavaScript Object Notation) represents data as objects, arrays, strings, numbers, booleans, and null. It's compact, readable, and parses natively in every language. APIs send Content-Type: application/json; clients JSON.parse the body. Its simplicity is why it beat XML for most APIs.

Power-ups you unlock

The 401 Bandit attacks — common mistakes

Boss battleWrite a JSON object for a user with a nested array of roles.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>{
  "id": 42,
  "name": "drew",
  "roles": ["admin", "builder"]
}</pre></body></html>
▶ Open the interactive comic issue
‹ Query Strings · Key=Value · EncodingXml · The Legacy Lingua Franca ›