MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _load_json

Function _load_json

agents/wiki-agent/ingest/backfill.py:17–28  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

15
16
17def _load_json(value: Any) -> Dict[str, Any]:
18 if isinstance(value, dict):
19 return value
20 if not value:
21 return {}
22 if isinstance(value, str):
23 try:
24 parsed = json.loads(value)
25 except json.JSONDecodeError:
26 return {}
27 return parsed if isinstance(parsed, dict) else {}
28 return {}
29
30
31def _paper_from_row(row: Any) -> Dict[str, Any]:

Callers 2

_paper_from_rowFunction · 0.70
backfill_userFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected