Python

JSON

Read a JSON file

import json
with( open( 'somedata.json' ) ) as json_file:
    json_dictionary = json.load( json_file )

Write a JSON file

import json
with open( 'somedata.json', 'w' ) as json_file:
    json.dump( json_dictionary, json_file )

Leave a Reply