Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.util.JsonFormat Class Reference

Classes

class  CompactTextGenerator
 
class  Parser
 
class  ParserImpl
 
class  PrettyTextGenerator
 
class  Printer
 
class  PrinterImpl
 
interface  TextGenerator
 
class  TypeRegistry
 

Static Public Member Functions

static Parser parser ()
 
static Parser parser ()
 
static Printer printer ()
 
static Printer printer ()
 

Private Member Functions

 JsonFormat ()
 
 JsonFormat ()
 

Static Private Member Functions

static String getTypeName (String typeUrl) throws InvalidProtocolBufferException
 
static String getTypeName (String typeUrl) throws InvalidProtocolBufferException
 
static String unsignedToString (final int value)
 
static String unsignedToString (final int value)
 
static String unsignedToString (final long value)
 
static String unsignedToString (final long value)
 

Static Private Attributes

static final Logger logger = Logger.getLogger(JsonFormat.class.getName())
 

Detailed Description

Utility classes to convert protobuf messages to/from JSON format. The JSON format follows Proto3 JSON specification and only proto3 features are supported. Proto2 only features (e.g., extensions and unknown fields) will be discarded in the conversion. That is, when converting proto2 messages to JSON format, extensions and unknown fields will be treated as if they do not exist. This applies to proto2 messages embedded in proto3 messages as well.

Definition at line 101 of file bloaty/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

Constructor & Destructor Documentation

◆ JsonFormat() [1/2]

com.google.protobuf.util.JsonFormat.JsonFormat ( )
inlineprivate

◆ JsonFormat() [2/2]

com.google.protobuf.util.JsonFormat.JsonFormat ( )
inlineprivate

Member Function Documentation

◆ getTypeName() [1/2]

static String com.google.protobuf.util.JsonFormat.getTypeName ( String  typeUrl) throws InvalidProtocolBufferException
inlinestaticprivate

◆ getTypeName() [2/2]

static String com.google.protobuf.util.JsonFormat.getTypeName ( String  typeUrl) throws InvalidProtocolBufferException
inlinestaticprivate

◆ parser() [1/2]

static Parser com.google.protobuf.util.JsonFormat.parser ( )
inlinestatic

Creates a Parser with default configuration.

Definition at line 396 of file bloaty/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ parser() [2/2]

static Parser com.google.protobuf.util.JsonFormat.parser ( )
inlinestatic

Creates a Parser with default configuration.

Definition at line 396 of file protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ printer() [1/2]

static Printer com.google.protobuf.util.JsonFormat.printer ( )
inlinestatic

Creates a Printer with default configurations.

Definition at line 109 of file bloaty/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ printer() [2/2]

static Printer com.google.protobuf.util.JsonFormat.printer ( )
inlinestatic

Creates a Printer with default configurations.

Definition at line 110 of file protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ unsignedToString() [1/4]

static String com.google.protobuf.util.JsonFormat.unsignedToString ( final int  value)
inlinestaticprivate

Convert an unsigned 32-bit integer to a string.

Definition at line 1270 of file protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ unsignedToString() [2/4]

static String com.google.protobuf.util.JsonFormat.unsignedToString ( final int  value)
inlinestaticprivate

Convert an unsigned 32-bit integer to a string.

Definition at line 1270 of file bloaty/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ unsignedToString() [3/4]

static String com.google.protobuf.util.JsonFormat.unsignedToString ( final long  value)
inlinestaticprivate

Convert an unsigned 64-bit integer to a string.

Definition at line 1279 of file bloaty/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

◆ unsignedToString() [4/4]

static String com.google.protobuf.util.JsonFormat.unsignedToString ( final long  value)
inlinestaticprivate

Convert an unsigned 64-bit integer to a string.

Definition at line 1279 of file protobuf/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java.

Member Data Documentation

◆ logger

static final Logger com.google.protobuf.util.JsonFormat.logger = Logger.getLogger(JsonFormat.class.getName())
staticprivate

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:09