Question
Why is my full JSON export not a valid JSON?
Answer
Full JSON export files can be very large. While the file is not a valid JSON, each line within the file is valid JSON. It may not be possible to open the file in a text editor because the file is too large. To prevent the text editor from crashing, you can use the computer's terminal to work the file.
To open a JSON file
- Navigate to the directory where your export file is located.
- Enter the following command using your filename:
head -1 filename
Filename example:
export-2019-03-18-1755-803744-360005036874bd48.json
- Copy and paste the result into a JSON Validator, such as jsonlint.com, to see the format of the data.
If the file is not too large, the data may have been exported in NDJSON, or Newline Delimited JSON formatting. To resolve this invalid format, edit the JSON output and put it into an array. More details can be found within the article: Exporting data to a JSON, CSV, or XML file.
Note: The ability to export data to a JSON, CSV, or XML file is limited to admins on the account.