1
0
mirror of https://gitee.com/coder-xiaomo/gitee2github synced 2025-01-26 19:30:25 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
gitee2github/assets/common.py

13 lines
331 B
Python

import os
import json
def saveJSON(data, filename):
with open(filename, 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=4)
def readJSON(filename):
with open(filename, 'r', encoding='utf-8') as f:
return json.load(f)
def fileExists(filename):
return os.path.exists(filename)