You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
419 B

# -*- coding: utf-8 -*-
# @Author: Admin
# @Date: 2019-11-01 16:52:34
# @Last Modified by: Admin
# @Last Modified time: 2019-11-01 18:18:14
def 读JSON文件(fileName=""):
import json
if fileName!='':
strList = fileName.split(".")
if strList[len(strList)-1].lower() == "json":
with open(fileName,mode='r',encoding="utf-8") as file:
return json.loads(file.read())