create json using python save as json file code example
Example 1: python json save to file
with open('output.json', 'w') as outfile:
json.dump(data, outfile)
Example 2: how to save string json to json object python
# how to load a string to json
import ast
jsonobj = ast.literal_eval(str(hdf))