MCPcopy Create free account
hub / github.com/OWASP/APTS / normalized_json_lines

Function normalized_json_lines

scripts/check_generated_artifacts.py:23–29  ·  view source on GitHub ↗
(contents: bytes, *, normalize_last_updated: bool)

Source from the content-addressed store, hash-verified

21
22
23def normalized_json_lines(contents: bytes, *, normalize_last_updated: bool) -> list[str]:
24 data = json.loads(contents.decode("utf-8"))
25
26 if normalize_last_updated and isinstance(data, dict) and "last_updated" in data:
27 data["last_updated"] = FIXED_TIMESTAMP
28
29 return (json.dumps(data, indent=2, ensure_ascii=False, sort_keys=True) + "\n").splitlines()
30
31
32def raw_text_lines(contents: bytes) -> list[str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected