MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / __structuredFromJson

Method __structuredFromJson

github/Requester.py:990–1001  ·  view source on GitHub ↗
(self, data: str)

Source from the content-addressed store, hash-verified

988 )
989
990 def __structuredFromJson(self, data: str) -> Any:
991 if len(data) == 0:
992 return None
993 else:
994 if isinstance(data, bytes):
995 data = data.decode("utf-8")
996 try:
997 return json.loads(data)
998 except ValueError:
999 if data.startswith("{") or data.startswith("["):
1000 raise
1001 return {"data": data}
1002
1003 def getFile(
1004 self,

Callers 1

__checkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected