Skip to content

Instantly share code, notes, and snippets.

@jonnyyu
Last active August 23, 2022 06:38
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 jonnyyu/7f01b632e3b6325a821f8c0124e31fa8 to your computer and use it in GitHub Desktop.
Save jonnyyu/7f01b632e3b6325a821f8c0124e31fa8 to your computer and use it in GitHub Desktop.
json_utils
import json
def read_json(json_file):
with open(json_file, 'r', encoding='utf-8') as fi:
return json.load(fi)
def write_json(obj, json_file):
with open(json_file, 'w', encoding='utf-8') as fo:
json.dump(obj, fo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment