public static class JsonFormat.Parser extends Object
| Modifier and Type | Method and Description |
|---|---|
JsonFormat.Parser |
ignoringUnknownFields()
Creates a new
JsonFormat.Parser configured to not throw an exception when an unknown field is
encountered. |
void |
merge(Reader json,
com.google.protobuf.Message.Builder builder)
Parses from JSON into a protobuf message.
|
void |
merge(String json,
com.google.protobuf.Message.Builder builder)
Parses from JSON into a protobuf message.
|
JsonFormat.Parser |
usingTypeRegistry(JsonFormat.TypeRegistry registry)
Creates a new
JsonFormat.Parser using the given registry. |
public JsonFormat.Parser usingTypeRegistry(JsonFormat.TypeRegistry registry)
JsonFormat.Parser using the given registry. The new Parser
clones all other configurations from this Parser.IllegalArgumentException - if a registry is already set.public JsonFormat.Parser ignoringUnknownFields()
JsonFormat.Parser configured to not throw an exception when an unknown field is
encountered. The new Parser clones all other configurations from this Parser.public void merge(String json, com.google.protobuf.Message.Builder builder) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException - if the input is not valid JSON
format or there are unknown fields in the input.public void merge(Reader json, com.google.protobuf.Message.Builder builder) throws IOException
com.google.protobuf.InvalidProtocolBufferException - if the input is not valid JSON
format or there are unknown fields in the input.IOException - if reading from the input throws.Copyright © 2008–2017 Google. All rights reserved.