Moved status routes to instrument/state

This commit is contained in:
Joel Collins 2020-01-29 17:43:52 +00:00
parent e9e2419fe4
commit 9b4bf4c8fc
16 changed files with 52 additions and 64 deletions

View file

@ -94,11 +94,14 @@ class JSONEncoder(flask.json.JSONEncoder):
# Numpy arrays
elif isinstance(o, np.ndarray):
return o.tolist()
# UUIDs
elif isinstance(o, UUID):
return str(o)
else:
# call base class implementation which takes care of
# raising exceptions for unsupported types
try:
return json.JSONEncoder.default(self, o)
return flask.json.JSONEncoder.default(self, o)
# if it's some mystery object, just return a string representation
except TypeError:
return str(o)