goog.proto2.Serializer
Classgoog.proto2.Serializer()
Abstract base class for PB2 serializers. A serializer is a class which implements the serialization and deserialization of a Protocol Buffer Message to/from a specific format.
.deserialize(descriptor, data)
Deserializes a message from the expected format.
descriptor
{goog.proto2.Descriptor
}
data
{*}
goog.proto2.Message
}
.deserializeTo(message, data)
Deserializes a message from the expected format and places the data in the message.
message
{goog.proto2.Message
}
data
{*}
.getDeserializedValue(field, value)
[protected]Returns the deserialized form of the given value for the given field if the field is a Message or Group and returns the value, converted or unchanged, for primitive field types otherwise.
field
{goog.proto2.FieldDescriptor
}
value
{*}
.getSerializedValue(field, value)
[protected]Returns the serialized form of the given value for the given field if the field is a Message or Group and returns the value unchanged otherwise.
field
{goog.proto2.FieldDescriptor
}
value
{*}
.serialize(message)
Serializes a message to the expected format.
message
{goog.proto2.Message
}