Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/__init__.py @ 122:21d92ff8cf31
Begin the handling of JSON-style configuration files
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Wed, 04 Apr 2018 09:45:29 +0200 |
| parents | c50ad93eb5dc |
| children | b883f4ef1967 |
line wrap: on
line diff
--- a/configmix/__init__.py Fri Mar 30 08:48:25 2018 +0200 +++ b/configmix/__init__.py Wed Apr 04 09:45:29 2018 +0200 @@ -64,6 +64,9 @@ from . import yaml with open(filename, "rb") as yf: return yaml.safe_load(yf) + elif fnl.endswith(".json"): + from . import json + return json.load(filename) elif fnl.endswith(".py"): from . import py return py.load(filename)
