The goog.proto2.TextFormatSerializer Class

goog.proto2.TextFormatSerializer
> goog.proto2.Serializer

goog.proto2.TextFormatSerializer(opt_ignoreMissingFields)

TextFormatSerializer, a serializer which turns Messages into the human readable text format.

opt_ignoreMissingFields {boolean=}
If true, then fields that cannot be found on the proto when parsing the text format will be ignored.

The goog.proto2.TextFormatSerializer.Parser Class

Helper class for parsing the text format. … more

.deserialize(descriptor, data)

Inherited from goog.proto2.Serializer .

Deserializes a message from the expected format.

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.

.deserializeTo(message, data)

Deserializes a message from text format and places the data in the message.

message {goog.proto2.Message}
The message in which to place the information.
data {*}
The text format data.
returns {?string}
The parse error or null on success.

.serialize(message)

Serializes a message to a string.

message {goog.proto2.Message}
The message to be serialized.
returns {string}
The serialized form of the message.