MCPcopy Create free account
hub / github.com/DVampire/FinAgent / parse_semi_formatted_json

Function parse_semi_formatted_json

finagent/utils/json_utils.py:51–63  ·  view source on GitHub ↗
(json_string)

Source from the content-addressed store, hash-verified

49
50
51def parse_semi_formatted_json(json_string):
52
53 obj = None
54
55 try:
56 response = refine_json(json_string)
57 print(response)
58 obj = json5.loads(response)
59
60 except Exception as e:
61 raise e
62
63 return obj
64
65def parse_semi_formatted_xml(text):
66 text = text.strip().replace('\r', '').replace('\t', '').replace('\n', '')

Callers

nothing calls this directly

Calls 1

refine_jsonFunction · 0.85

Tested by

no test coverage detected