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

Class ComplexObject1Serializer

python/pyfory/tests/test_cross_language.py:615–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613
614
615class ComplexObject1Serializer(pyfory.serializer.Serializer):
616 def write(self, write_context, value):
617 write_context.write_ref(value.f1)
618 write_context.write_ref(value.f2)
619 write_context.write_ref(value.f3)
620
621 def read(self, read_context):
622 obj = ComplexObject1(*([None] * len(typing.get_type_hints(ComplexObject1).keys())))
623 read_context.reference(obj)
624 obj.f1 = read_context.read_ref()
625 obj.f2 = read_context.read_ref()
626 obj.f3 = read_context.read_ref()
627 return obj
628
629
630@cross_language_test

Callers 1

test_register_serializerFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_register_serializerFunction · 0.56