Skip to content

Instantly share code, notes, and snippets.

@key
Last active August 30, 2018 13:15
Show Gist options
  • Save key/814427ce19fa41bc42ba52a3c60704d1 to your computer and use it in GitHub Desktop.
Save key/814427ce19fa41bc42ba52a3c60704d1 to your computer and use it in GitHub Desktop.
Encoding / Decoding JSON in python
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