In plain words
JSON is a plain-text way of writing objects and arrays, so data can travel between your browser, your server and services like Stripe or Supabase.
Where you see it
Open the Network tab in your browser's dev tools, click a request, and the response is JSON. Your package.json is JSON too, which is why one stray comma in it can stop the whole project from installing.
What goes wrong
- A trailing comma or a comment
JSON is stricter than JavaScript. A comma after the last item or a // comment makes the file invalid, and npm refuses to run.
{ "dev": "vite", } - Parsing an error page as JSON
When an API route fails, it often sends back an HTML page. res.json() then throws "Unexpected token '<'", because HTML starts with <.
- Dates arriving as text
JSON has no date type, so a date travels as a string like "2026-12-05T09:00:00Z". Code that calls date methods on it without converting first breaks.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour app crashes with "Unexpected token '<', "<!DOCTYPE "... is not valid JSON". What did the server send?