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

Function round_trip_test

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

Source from the content-addressed store, hash-verified

5
6
7def round_trip_test(obj):
8 # serde_json and Python's json module produce slightly differently spaced
9 # output; direct string comparison can't pass on both so we use this as a
10 # proxy
11 return obj == json.loads(json.dumps(obj))
12
13
14def json_dump(obj):

Callers 1

stdlib_json.pyFile · 0.85

Calls 2

loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected