Here is how to load and write json files.