Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python json serialize print pretty

pretty_print_json = pprint.pformat(json_data).replace("'", '"')

with open('file_name.json', 'w') as f:
    f.write(pretty_print_json)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #json #serialize #print #pretty
ADD COMMENT
Topic
Name
2+3 =