public static class JsonFormat.Parser extends Object
Modifier and Type | Method and Description |
---|---|
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 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–2016 Google. All rights reserved.