Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
21
def
json_load(obj):
22
f = StringIO(obj)
if
isinstance(obj, str)
else
BytesIO(bytes(obj))
23
return
json.load(f)
24
25
26
assert
'"string"'
== json.dumps(
"string"
)
Callers
1
stdlib_json.py
File · 0.85
Calls
4
StringIO
Class · 0.90
BytesIO
Class · 0.90
isinstance
Function · 0.85
load
Method · 0.45
Tested by
no test coverage detected