MCPcopy
hub / github.com/github/awesome-copilot / load_json

Function load_json

skills/quality-playbook/quality_gate.py:502–510  ·  view source on GitHub ↗

Parse JSON file. Return parsed value, or None on any error.

(path)

Source from the content-addressed store, hash-verified

500
501
502def load_json(path):
503 """Parse JSON file. Return parsed value, or None on any error."""
504 if not path.is_file():
505 return None
506 try:
507 with open(path, "r", encoding="utf-8") as f:
508 return json.load(f)
509 except (OSError, json.JSONDecodeError):
510 return None
511
512
513def has_key(data, key):

Callers 11

check_tdd_sidecarFunction · 0.85
check_recheck_sidecarFunction · 0.85
check_version_stampsFunction · 0.85
check_run_metadataFunction · 0.85
_v150_manifestFunction · 0.85
_load_role_mapFunction · 0.85

Calls 1

openFunction · 0.50

Tested by

no test coverage detected