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

Function compat_ser_de

python/pyfory/tests/test_struct.py:49–54  ·  view source on GitHub ↗
(remote_cls, local_cls, value, type_id, ref=False)

Source from the content-addressed store, hash-verified

47
48
49def compat_ser_de(remote_cls, local_cls, value, type_id, ref=False):
50 writer = Fory(xlang=True, compatible=True, ref=ref)
51 reader = Fory(xlang=True, compatible=True, ref=ref)
52 writer.register_type(remote_cls, type_id=type_id)
53 reader.register_type(local_cls, type_id=type_id)
54 return reader.deserialize(writer.serialize(value))
55
56
57def compat_ser(remote_cls, local_cls, value, type_id):

Calls 4

register_typeMethod · 0.95
deserializeMethod · 0.95
serializeMethod · 0.95
ForyClass · 0.90

Tested by

no test coverage detected