User guide
×
Menu
  • Convert JSON array to CSV dialog

Convert JSON array to CSV dialog

 
Use the "JSON | Convert JSON to CSV file..." command to convert JSON input to CSV tables. This command is enabled after selecting a file in the built-in "File Explorer" or an active document is loaded on the Editor tab. To start the conversion, use the dialog to set various options to locate the JSON array and to format the CSV output.
 
To avoid size limitations, the conversion process is using a full streaming mode for reading all JSON input and writing the generated CSV output.
 
A JSON to CSV conversion can be started for the current document and also for (multiple) files selected in the built-in File Explorer window. To use the File Explorer, select one or more files in the list and use the "Convert JSON to CSV file..." command from the right-click context menu of the Explorer window.
 
Convert JSON array to CSV dialog
1

Set location of JSON array as JSONPointer

1. Set location of JSON array as JSONPointer
JSON pointer to set the location of the array where the conversion process will start. The right-click context menus of the text and Grid views provide commands to copy the JSONPointer of the current selection to the clipboard. Use those commands to make it simple to set the location of the JSON array.
2

Enabled for current document

2. Enabled for current document
This button is enabled if the current document is converted to CSV and a valid JSONPointer for the current selection is available. On clicking this button the current JSON pointer is copied to the location field.
3

Scan input button

3. Scan input button
Reload column definitions from JSON input according to the current settings.
4

Set limit of JSON array items for column definitions

4. Set limit of JSON array items for column definitions
Set a limit of array items to scan for column definitions. Remove the check to scan the complete JSON input for column definitions.
5

Include child objects and values in output

5. Include child objects and values in output
For objects, all child properties are also included in the generated output.
6

Load column definitions

6. Load column definitions
Load definitions from disk as JSON array.
7

Save definitions to disk

7. Save definitions to disk
Save definitions to disk as JSON array.
8

List of columns in output

This list contains all of the JSON values which will be converted to CSV. You can add values set as JSONPointers using the "Add" and "Remove" buttons. The column labels are actually JSONPointer fragments relative to the starting level within the JSON input.
9

Update preview with current settings

9. Update preview with current settings
The CSV output preview is reloaded using the current conversion options.
10

Preview of generated output

10. Preview of generated output
 
11

Add column definition

11. Add column definition
 
12

Remove

12. Remove
 
13

Move column up

13. Move column up
 
14

Down

14. Down
 
15

Options to set column separator

15. Options to set column separator
 
16

Output encoding

16. Output encoding
Please select the encoding that should be used on writing the CSV output. By default a standard ASCII encoding is used.
17

Create header row toggle

17. Create header row toggle
Add a header line with column labels to the CSV output.
18

Start conversion process

18. Start conversion process
 
In general, the conversion process takes all JSON values it can find at a specific array in the JSON document. This location can be the root of the JSON data or any other valid JSONPointer.
 
A list of JSON values is updated whenever the "Scan input" button is clicked. The list of column definitions can also be used to change the order in the CSV output, to remove values from the output and to add values which were not detected automatically. Use the "Remove" button to skip a JSON value in the CSV output. In order to move a value up or down select the value from the list and use the "Up" or "Down" buttons.
 
The "Take from selection" button is enabled if the dialog was opened from an active document on the Editor tab. In this case the JSON pointer location is taken from the current selection in the JSON data.
 
To generate the actual output, use the "Convert" button. This will open a new document in the editor with the conversion results as CSV. Afterwards you can save the CSV data with the standard "File | Save" command.
 
Error reporting
 
It can happen that not all of the JSON input can be converted to CSV. For example, the JSON input could have syntax errors at a specific line. Any available CSV output is written to a new document and the standard "Results" window of the application will then display all of the reported errors. Please note that not all of the JSON input is converted in this case.