The goog.proto2.TextFormatSerializer.Parser Class

goog.proto2.TextFormatSerializer.Parser()

Helper class for parsing the text format.

.getError()

returns {?string}
The parse error, if any.

.parse(message, data, opt_ignoreMissingFields)

Parses the given data, filling the message as it goes.

message {goog.proto2.Message}
The message to fill.
data {string}
The text format data.
opt_ignoreMissingFields {boolean=}
If true, fields missing in the proto will be ignored.
returns {boolean}
True on success, false on failure. On failure, the getError method can be called to get the reason for failure.