Last Updated: 2022-12-01
I was supposed to ship a few MB of JSON files to Project M. I created the files by printing the JSON to STDOUT and thought my job was done.
But luckily, before shipping, I decided to validate the JSON by running it through a lint tool:
$ yarn run jsonlint output/myevent.json
I discovered, luckily before shipping, that I had no commas between entries and therefore and data would be broken for input.
Always sanity check your data exports before handing it away (e.g. by importing the data to a DB, or parsing/linting)
JSON.write type methods on the global data object rather than
iteratively printing the elements (since this approach omits the