MCPcopy Index your code
hub / github.com/apache/fory / read

Method read

python/pyfory/serializer.py:1277–1286  ·  view source on GitHub ↗
(self, read_context)

Source from the content-addressed store, hash-verified

1275 write_context.write_string(qualname)
1276
1277 def read(self, read_context):
1278 class_type = read_context.read_int8()
1279
1280 if class_type == 1:
1281 return self._deserialize_local_class(read_context)
1282 module_name = read_context.read_string()
1283 qualname = read_context.read_string()
1284 cls = _resolve_validated_module_qualname(read_context.policy, module_name, qualname)
1285 read_context.policy.validate_class(cls, is_local=_is_local_class(cls))
1286 return cls
1287
1288 def _serialize_local_class(self, write_context, cls):
1289 """Serialize a local class by capturing its creation context."""

Calls 6

_is_local_classFunction · 0.85
read_int8Method · 0.45
read_stringMethod · 0.45
validate_classMethod · 0.45