/python-json-loader

Python json files import (experiment)

Primary LanguagePython

json-loader

data.json
{
  "obj": {
    "val": "hello"
  }
}
python code
import json_loader
# add directory with .json files (working directory in this case)
json_loader.install_json_loader('.')
# import .json file (data.json)
import data
# access to json values
val = data.obj.val
assert val == 'hello'