goog.proto2.PbLiteSerializer
Provided By | |
---|---|
Extends |
PB-Lite serializer.
new PbLiteSerializer()
Parameters | None. |
---|
Instance Methods
this.deserialize( descriptor, data ) → goog.proto2.Message
goog.proto2.Message
Deserializes a message from the expected format.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns |
|
this.deserializeField( message, field, data ) → *
*
Deserializes a message field from the expected format and places the data in the given message
Overrides | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||||||
Returns |
|
this.deserializeTo( message, data ) → void
void
Deserializes a message from the expected format and places the data in the message.
Defined by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Overrides | |||||||||
Parameters |
|
this.getDeserializedValue( field, value ) → *
*
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.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns |
|
this.getSerializedValue( field, value ) → *
*
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, except for Infinity, -Infinity and NaN numerical values which are converted to string representation.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns |
|
this.serialize( message ) → Array<?>
Array<?>
Serializes a message to a PB-Lite object.
Overrides | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns |
|
this.setZeroIndexed( zeroIndexing ) → void
void
By default, the proto tag with id 1 will have index 1 in the serialized array.
If the serializer is set to use zero-indexing, the tag with id 1 will have index 0.
Parameters |
|
---|