how to import jason in python code example
Example 1: python json dump to file
import json
with open('data.json', 'w') as f:
json.dump(data, f)
Example 2: python format json file
python3 -m json.tool unformatted.json > formatted.json
import json
with open('data.json', 'w') as f:
json.dump(data, f)
python3 -m json.tool unformatted.json > formatted.json