Skip to main content

Debug JSON and API Data

Learn a repeatable workflow to format, validate, compare, and convert JSON or API data with practical browser-based exercises and checkpoints.

Beginner 35–50 minutes 5 steps

Why this workflow matters

API failures often look unrelated: a parser error, a missing field, or a CSV import that shifts every column. They usually become easier once you inspect the data in a consistent order. This path teaches that order with a small sample you can safely change and break.

This workflow sits inside the developer debugging tools cluster, with additional converters in the data-tools collection.

Work through the steps

0 of 5 complete
1

Make the payload readable

Uses JSON Formatter & Beautifier

What to understand

Whitespace does not change JSON data, but it changes how quickly a person can inspect it. Start by formatting a minified payload so nesting and repeated keys are visible.

Try it

Paste a one-line JSON object with a nested array. Format it, then minify it again and confirm both versions represent the same values. Complete the exercise in the JSON Formatter & Beautifier, then return here to verify the checkpoint.

Checkpoint

You can point to each object, array, key, string, number, boolean, and null value.

2

Find syntax failures precisely

Uses JSON Validator

What to understand

A formatter can only work after the input is valid. Validators expose the first place where the parser can no longer understand the document.

Try it

Remove a comma and then a closing brace from your sample. Record how the error message and position change for each failure. Complete the exercise in the JSON Validator, then return here to verify the checkpoint.

Checkpoint

You can distinguish the location reported by the parser from the earlier typo that caused it.

3

Compare expected and actual responses

Uses JSON Diff Checker

What to understand

Side-by-side inspection is unreliable once objects become nested. A structural diff highlights added, removed, and changed values without treating harmless whitespace as a change.

Try it

Copy the valid sample into both sides. Change a value, remove one key, and add an item to an array before running the diff. Complete the exercise in the JSON Diff Checker, then return here to verify the checkpoint.

Checkpoint

The result identifies all three change types and no whitespace-only noise.

4

Move tabular data into JSON

Uses CSV to JSON Converter

What to understand

CSV has rows and columns; JSON can preserve that table as an array of objects. The header row becomes the object keys, so clean and unique headings matter.

Try it

Convert a three-row CSV with name, status, and score columns. Inspect the resulting value types and note which numbers remain strings. Complete the exercise in the CSV to JSON Converter, then return here to verify the checkpoint.

Checkpoint

Every CSV row maps to one object and every header maps to one key.

5

Export only truly tabular JSON

Uses JSON to CSV Converter

What to understand

CSV is a good export target only when records share a flat shape. Nested objects and arrays require a deliberate flattening rule or they lose meaning.

Try it

Convert the previous JSON back to CSV, then add a nested object and observe how the output changes. Complete the exercise in the JSON to CSV Converter, then return here to verify the checkpoint.

Checkpoint

You can explain whether the round trip preserves every value in your sample.