mqtt-sensord/mqtt_sensord/sensorlib/config.py

12 lines
178 B
Python
Raw Permalink Normal View History

2019-07-09 22:01:39 +02:00
import sys
if sys.implementation == 'micropython':
import ujson as json
else:
import json
def load_config(path):
with open(path) as f:
return json.load(f)