JSON Practice: Fix Invalid JSON & Config Files

JSON looks like a JavaScript object, but its rules are stricter. These two beginner exercises ask you to repair an API response and a configuration file, and to validate every change.

Know what objects, arrays, strings, numbers and booleans are. The lessons explain each syntax rule when you need it.

What you will practise

Quotes and commas

Use double quotes for names and strings and remove a trailing comma.

Comments and booleans

Remove a comment, write true and false in lowercase and add a missing comma.

2 exercises to try

How to use these exercises

Run the validator, read the reported location, fix one problem and validate again. Making one change at a time shows which edit solved which error.

Runtime and progress

The JSON validator checks syntax only. It does not check JSON Schema or the business rules of an API, and sensitive production data should not be pasted into it.

Completion is self-reported. There is no automated grading, and progress is saved only on this device.

Browse every practice topic