Developer

Every JSON Workflow a Developer Actually Needs

By ABD Web Tools Editorial · 2026-02-02 · 8 min read

Developer working with code on a large monitor
Photo via Unsplash

JSON is the lingua franca of web APIs, and yet most of the time we spend on it goes into the same handful of chores: making an unreadable response legible, checking whether a payload matches a shape, finding what changed between two versions, and turning it into something a spreadsheet can open. Doing those four things quickly and safely is a genuine productivity gain.

Formatting is a debugging tool

A minified response is not just ugly, it hides structure. Pretty-printing with two-space indentation reveals nesting depth, unexpected arrays and null-versus-missing distinctions immediately. When you inherit an unfamiliar API, formatting the first response is the fastest way to build a mental model of it.

Sorting keys alphabetically is a useful extra step when you plan to compare two payloads later — it removes ordering noise from the diff.

Validation catches the errors humans miss

Trailing commas, single quotes, unescaped newlines inside strings and duplicate keys account for most hand-edited JSON failures. A validator points at the exact character rather than making you bisect the file.

Remember that duplicate keys are technically legal in the specification but resolved inconsistently across parsers. Treat them as errors.

Advertisement

Ad space

Diffing beyond text comparison

A plain text diff of two JSON documents is nearly useless when key order or whitespace differs. A structural diff compares by path, so you learn that data.items[3].price changed from 19 to 21 instead of seeing forty lines highlighted.

This matters most in regression testing and when reviewing configuration changes, where the interesting change is often one value buried deep in the tree.

Converting to CSV and back

Flattening nested JSON to CSV always involves a decision about how to represent nesting. The two common conventions are dotted paths for object keys and index suffixes for arrays. Pick one and document it, because the round trip is only lossless if both sides agree.

  • Dotted paths: user.address.city becomes a single column header.
  • Arrays: either explode into rows or serialise as a JSON string in one cell.
  • Always quote fields containing commas, quotes or newlines.

Encoding traps that cause silent bugs

Numbers larger than 2^53 lose precision when parsed into JavaScript numbers — transmit them as strings. Dates have no native JSON type, so standardise on ISO 8601 with an explicit timezone. And a missing key is not the same as a null value; APIs that treat them interchangeably create downstream ambiguity.

Handling large payloads without freezing the tab

Files above a few megabytes should be truncated for display, streamed rather than parsed whole, or inspected with a path query instead of rendered in full. If a browser tool locks up, that is usually the renderer rather than the parser — display a summary tree instead of the entire document.

Privacy: know where your payload goes

API responses frequently contain tokens, email addresses and internal identifiers. Prefer tools that process entirely in the browser, and redact obviously sensitive fields before pasting anything into a shared environment.

Frequently asked questions

Is JSON5 or JSONC worth using?

For configuration files that humans edit, comments and trailing commas are genuinely helpful. For wire formats between services, stick to strict JSON so every parser agrees.

How should I represent money in JSON?

As an integer number of minor units plus a currency code, or as a string. Floating-point values invite rounding errors.

Are JSON schemas worth the effort?

For any payload crossing a team boundary, yes. A schema turns integration bugs into validation errors at the edge.

What is the safest way to pretty-print secrets-bearing JSON?

Use a tool that runs entirely client side so the document never leaves your machine.

Advertisement

Ad space

Keep reading