proto2.Serializer Extends
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.

Inheritance

Constructor

goog.proto2.Serializer()

Instance Methods

Public Protected Private
deserialize(descriptordata) !goog.proto2.Message
Deserializes a message from the expected format.
Arguments:
descriptor : goog.proto2.Descriptor
The descriptor of the message to be created.
data : *
The data of the message.
Returns: !goog.proto2.Message  The message created.
code »
deserializeTo(messagedata)
Deserializes a message from the expected format and places the data in the message.
Arguments:
message : goog.proto2.Message
The message in which to place the information.
data : *
The data of the message.
code »
getDeserializedValue(fieldvalue) *
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.
Arguments:
field : goog.proto2.FieldDescriptor
The field from which this value came.
value : *
The value of the field.
Returns: *  The value.
code »
getSerializedValue(fieldvalue) *
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.
Arguments:
field : goog.proto2.FieldDescriptor
The field from which this value came.
value : *
The value of the field.
Returns: *  The value.
code »
serialize(message) *
Serializes a message to the expected format.
Arguments:
message : goog.proto2.Message
The message to be serialized.
Returns: *  The serialized form of the message.
code »

Static Properties

goog.proto2.Serializer.DECODE_SYMBOLIC_ENUMS :
No description.
Code »

Package proto2

Package Reference