示例#1
0
def default_serialization_context():
    _deprecate_serialization("default_serialization_context")
    context = SerializationContext()
    _register_default_serialization_handlers(context)
    return context
示例#2
0
def default_serialization_context():
    context = SerializationContext()
    register_default_serialization_handlers(context)
    return context
示例#3
0
 def get_serialization_context(cls) -> SerializationContext:
     context = SerializationContext()
     context.register_type(Hishty, Hishty.__name__, custom_serializer=cls.serialize, custom_deserializer=cls.deserialize)
     return context