Skip to content

Instantly share code, notes, and snippets.

@johnmanjiro13
Created October 26, 2018 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmanjiro13/8abc2283f7f9f06c52e757e2f0c13c7e to your computer and use it in GitHub Desktop.
Save johnmanjiro13/8abc2283f7f9f06c52e757e2f0c13c7e to your computer and use it in GitHub Desktop.
decorate get_json
import json
@try_except(exreturn_value="except!")
def get_json(json_data):
return json.loads(json_data) # 正常時:JSONのデータをもつdict、例外時:except!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment