mqtt-sensord/mqtt_sensord/sensorlib/config.py

12 lines
178 B
Python

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)