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

Function compat_ser

python/pyfory/tests/test_struct.py:57–62  ·  view source on GitHub ↗
(remote_cls, local_cls, value, type_id)

Source from the content-addressed store, hash-verified

55
56
57def compat_ser(remote_cls, local_cls, value, type_id):
58 writer = Fory(xlang=True, compatible=True, ref=False)
59 reader = Fory(xlang=True, compatible=True, ref=False)
60 writer.register_type(remote_cls, type_id=type_id)
61 reader.register_type(local_cls, type_id=type_id)
62 return writer, reader, writer.serialize(value)
63
64
65@dataclass

Calls 3

register_typeMethod · 0.95
serializeMethod · 0.95
ForyClass · 0.90

Tested by

no test coverage detected