Created
February 26, 2015 02:33
-
-
Save otknoy/a7838b43102c89e0d872 to your computer and use it in GitHub Desktop.
Python で日本語を含む dict を文字化けせずに表示 (ついでに整形)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
data = {"hoge": 1, "hige": 2, "huge" 3} | |
json_data = json.dumps(data, ensure_ascii=False, indent=2) | |
print json_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment