Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rubix982/49948b9887e2ffead3ed58676961b402 to your computer and use it in GitHub Desktop.
Save Rubix982/49948b9887e2ffead3ed58676961b402 to your computer and use it in GitHub Desktop.
Saving the data
# Lets first save all of the data as a JSON
with open('image_id_list.json', 'w') as file_pointer:
json.dump(image_id_list, file_pointer, indent=4)
# For each collection item, lets remove the property data to get a smaller JSON version
for iter in image_id_list:
del iter['property_data']
# Lets save this version of the data as a JSON to recollect at any point in time
with open('image_id_list_without_property.json', 'w') as file_pointer:
json.dump(image_id_list, file_pointer, indent=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment