MCPcopy Create free account
hub / github.com/apache/fory / msgpack_roundtrip_dataclass

Function msgpack_roundtrip_dataclass

benchmarks/python/fory_benchmark.py:311–315  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

309
310
311def msgpack_roundtrip_dataclass(obj):
312 payload = make_msgpack_compatible(obj)
313 binary = msgpack.dumps(payload, use_bin_type=True)
314 restored = msgpack.loads(binary, raw=False, strict_map_key=False)
315 _restore_dataclass_from_template(restored, obj)
316
317
318def msgpack_serialize(obj):

Callers

nothing calls this directly

Calls 4

make_msgpack_compatibleFunction · 0.85
dumpsMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected