MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / jsonify

Function jsonify

AskAgent/python/core/utils/json_utils.py:12–18  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

10 return item
11
12def jsonify(obj):
13 if isinstance(obj, str):
14 try:
15 obj = json.loads(obj)
16 except json.JSONDecodeError:
17 return obj
18 return obj
19
20def trim_json(obj):
21 obj = jsonify(obj)

Callers 5

trim_jsonFunction · 0.70
trim_json_hardFunction · 0.70
trim_recipeFunction · 0.70
merge_json_objectsFunction · 0.70
merge_json_arrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected