Question
Why is my full JSON export not valid JSON?
Answer
Full JavaScript Object Notation (JSON) export files can be very large. They are in newline-delimited JSON (NDJSON) format. In NDJSON, each line in the file is a separate, valid JSON object. The file as a whole is not a single JSON array or object, which can make the file appear invalid if you open or parse it as standard JSON.
Because these files can be large, you might not be able to open one in a regular text editor. The editor might crash. Instead, view part of the file in your computer’s terminal.
To open a full JSON export file:
- Go to the directory that contains your export file
-
Run this command with your file name:
head -1 filename
File name example:export-2019-03-18-1755-803744-360005036874bd48.json
- Copy and paste the result into a JSON validator, such as jsonlint.com, to check the format of one line
If you need the data in a standard JSON array, convert the NDJSON file. Put all JSON objects in square brackets [ ] and separate them with commas. For more information, see Exporting data to a JSON, CSV, or XML file.