Moved status routes to instrument/state
This commit is contained in:
parent
e9e2419fe4
commit
9b4bf4c8fc
16 changed files with 52 additions and 64 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue