MCPcopy Index your code
hub / github.com/RustPython/RustPython / json_load

Function json_load

extra_tests/snippets/stdlib_json.py:21–23  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

19
20
21def json_load(obj):
22 f = StringIO(obj) if isinstance(obj, str) else BytesIO(bytes(obj))
23 return json.load(f)
24
25
26assert '"string"' == json.dumps("string")

Callers 1

stdlib_json.pyFile · 0.85

Calls 4

StringIOClass · 0.90
BytesIOClass · 0.90
isinstanceFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected