首页 > 代码库 > python json5

python json5

install

pip install json5

test

a.json:

{
‘a‘:‘b‘,
‘aa‘:[‘b1‘,‘b2‘]
}


===========================
import json5

a = json5.load(open("./a.json","r"))
print a


===========================
{‘a‘: ‘b‘, ‘aa‘: [‘b1‘, ‘b2‘]}

python json5