public class JsonFormat
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
JsonFormat.CompactTextGenerator
Format the json without indentation
|
static class |
JsonFormat.Parser
A Parser parses JSON to protobuf message.
|
private static class |
JsonFormat.ParserImpl |
private static class |
JsonFormat.PrettyTextGenerator
A TextGenerator adds indentation when writing formatted text.
|
static class |
JsonFormat.Printer
A Printer converts protobuf message to JSON format.
|
private static class |
JsonFormat.PrinterImpl
A Printer converts protobuf messages to JSON format.
|
(package private) static interface |
JsonFormat.TextGenerator
An interface for json formatting that can be used in
combination with the omittingInsignificantWhitespace() method
|
static class |
JsonFormat.TypeRegistry
A TypeRegistry is used to resolve Any messages in the JSON conversion.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
logger |
Modifier | Constructor and Description |
---|---|
private |
JsonFormat() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
getTypeName(java.lang.String typeUrl) |
static JsonFormat.Parser |
parser()
Creates a
JsonFormat.Parser with default configuration. |
static JsonFormat.Printer |
printer()
Creates a
JsonFormat.Printer with default configurations. |
private static java.lang.String |
unsignedToString(int value)
Convert an unsigned 32-bit integer to a string.
|
private static java.lang.String |
unsignedToString(long value)
Convert an unsigned 64-bit integer to a string.
|
public static JsonFormat.Printer printer()
JsonFormat.Printer
with default configurations.public static JsonFormat.Parser parser()
JsonFormat.Parser
with default configuration.private static java.lang.String unsignedToString(int value)
private static java.lang.String unsignedToString(long value)
private static java.lang.String getTypeName(java.lang.String typeUrl) throws InvalidProtocolBufferException
InvalidProtocolBufferException