Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    A small course in 8 short lessons on JSON, the text format that websites and apps use to send data to each other. You write objects, text and numbers, true, false and null, arrays and nested data, and you fix JSON that is broken. In the first seven lessons your text is checked by a real JSON parser in your browser, so a missing quote or a comma too many is found, and you see the message of your browser. The last lesson is about JSON.parse and JSON.stringify in JavaScript and is checked with a pattern. Your text stays in your browser and your progress is remembered there.

    Features

    • 8 short lessons, from a single object to fixing broken JSON
    • Your JSON is checked by a real parser, with the message of your browser
    • A hint and the model answer for every lesson
    • Your progress is remembered in this browser

    How to use Learn JSON

    1. Read the lesson and the task.
    2. Write your JSON in the editor.
    3. Press Check my answer. Use the hint or the answer if you are stuck.
    4. Go to the next lesson.

    Frequently asked questions

    Is my JSON really checked?

    Yes, for the first seven lessons. Your text is read with the JSON parser of your browser, so an error such as a missing quote or a trailing comma is found. Then the course checks that the data has what the task asks for. The last lesson is JavaScript and is checked with a pattern, because the code is not run.

    Why do I see an English error message?

    The message comes from the JSON parser of your browser, not from this course, so it can be in English and can differ per browser. It names the position of the first mistake, which is a good place to start looking.

    What is the difference between JSON and a JavaScript object?

    JSON is text with strict rules: keys and text in double quotes, no trailing commas, no comments and no functions. A JavaScript object is a value in a running program. JSON.parse turns JSON text into such a value and JSON.stringify does the opposite.

    Is my text saved?

    Only which lessons you finished is saved, in this browser. What you type is not stored or sent anywhere.

    Guides

    Related tools