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

Function _json_loads

skills/wiki-store/scripts/wiki_db.py:43–54  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

41
42
43def _json_loads(value: Any) -> Dict[str, Any]:
44 if isinstance(value, dict):
45 return value
46 if not value:
47 return {}
48 if isinstance(value, str):
49 try:
50 parsed = json.loads(value)
51 except json.JSONDecodeError:
52 return {}
53 return parsed if isinstance(parsed, dict) else {}
54 return {}
55
56
57def _slug(value: str, *, max_len: int = 96) -> str:

Callers 2

_row_to_nodeFunction · 0.85
write_node_mirrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected