Update app.py
Browse files
app.py
CHANGED
@@ -135,13 +135,13 @@ else:
|
|
135 |
|
136 |
|
137 |
# json result
|
138 |
-
class
|
139 |
"""Encode dict to json."""
|
140 |
|
141 |
def default(self, o):
|
142 |
"""Encode to JSON using to_dict."""
|
143 |
-
return
|
144 |
|
145 |
|
146 |
if st_return_decision_process:
|
147 |
-
st.json(json.dumps(st_analyze_results, cls=
|
|
|
135 |
|
136 |
|
137 |
# json result
|
138 |
+
class ToDictListEncoder(JSONEncoder):
|
139 |
"""Encode dict to json."""
|
140 |
|
141 |
def default(self, o):
|
142 |
"""Encode to JSON using to_dict."""
|
143 |
+
return [res.to_dict() for res in o]
|
144 |
|
145 |
|
146 |
if st_return_decision_process:
|
147 |
+
st.json(json.dumps(st_analyze_results, cls=ToDictListEncoder))
|