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

Function jsonify

AskAgent/python/core/utils/trim.py:10–16  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

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

Callers 3

trim_jsonFunction · 0.70
trim_json_hardFunction · 0.70
trim_recipeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected