Test exporting to json file