pretty-print json in python (pythonic way)

后端 未结 4 1870
闹比i
闹比i 2021-01-31 01:16

I know that the pprint python standard library is for pretty-printing python data types. However, I\'m always retrieving json data, and I\'m wondering if there is a

4条回答
  •  无人及你
    2021-01-31 01:55

    Use for show unicode values and key.

    print (json.dumps(pretty_json, indent=2, ensure_ascii=False))
    

提交回复
热议问题