Convert JSON to CSV: Generate pointer/value pairs from your data

JSONBuddy already supports to convert JSON data to CSV (and also back from CSV to JSON…). You can learn more about the standard JSON to CSV dialog at the help pages. Starting with JSONBuddy 5, there is a new way to generate CSV output from JSON input in the editor: The “Convert JSON to pointer/value pairs” command.

To illustrate this method, we take the following JSON input as an example:

library.json from the example files coming with JSONBuddy

And we use the “JSON | Convert JSON to pointer/value pairs” command from the editor, which is applied to the active document, to get the following CSV output:

CSV output from library.json

This CSV output contains all the data from the JSON input to create the original JSON structure again.

  1. The left column is the JSONPointer where the actual value is located. The pointers contain the objects, arrays and property name information of the JSON input.
  2. The right column is the JSON value. This also means, the number of lines in the CSV output equals the number of single JSON values in the input data.

Of course, you can edit and save the CSV data in the JSON editor and take it as input to other tools like Excel.