Last active
August 30, 2018 13:15
-
-
Save key/814427ce19fa41bc42ba52a3c60704d1 to your computer and use it in GitHub Desktop.
Encoding / Decoding JSON in python
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 | |
# JSON文字列をPythonオブジェクトにする | |
print(json.loads('{"key":"value"}')) | |
# PythonオブジェクトをJSON文字列にする | |
print(json.dumps({"key":"value"})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment