Data Transformation beginner 8 min

Make a Nested JSON Response Readable

Pretty-print a dense response so nested fields can be reviewed and copied safely.

Scenario

A log line captured an API response as minified JSON — one line, no spaces, braces everywhere. You need to check whether subscription.active is true for this user, but eyeballing nested objects in minified JSON is how people misread "active":true on the wrong object. Ten seconds of pretty-printing beats five minutes of brace-counting.

Broken input

{"user":{"id":42,"email":"ada@example.test"},"subscription":{"plan":"pro","active":true}}

Goal

Use JSON Formatter to turn the minified response into indented, readable structure with the original data untouched. Formatting is a purely cosmetic operation — if a value looks different afterwards, something went wrong in the copy, not the format.

Tool sequence

  1. Open JSON Formatter.
  2. Paste the full log line's JSON — a partial copy that cuts a closing brace will fail to parse, which is itself useful information.
  3. Pretty-print and read the top-level shape first: two objects, user and subscription.
  4. Drill into the object you actually care about — subscription.active is true and belongs to subscription, not user.
  5. If you need to confirm the payload matches an expected contract, continue in JSON Schema Validator / Generator; to see it as a graph, use JSON Visualizer.

Checkpoint output

{
  "user": {
    "id": 42,
    "email": "ada@example.test"
  },
  "subscription": {
    "plan": "pro",
    "active": true
  }
}

The user and subscription objects are clearly separated, and active: true is unambiguously a subscription field.

Common mistakes

  • Editing minified JSON by hand before formatting it, adding a syntax error to a payload that was fine.
  • Copying a partial nested object from the log and losing the closing braces.
  • Assuming formatted JSON is semantically valid for the API — pretty-printing checks syntax, not the contract.
  • Reading a value off the wrong nesting level because two objects share a key name like id.

Related tools and lessons