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 Printer printer ()
 

Private Member Functions

 JsonFormat ()
 

Static Private Member Functions

static String getTypeName (String typeUrl) throws InvalidProtocolBufferException
 
static String unsignedToString (final int 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 JsonFormat.java.

Constructor & Destructor Documentation

◆ JsonFormat()

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

Definition at line 104 of file JsonFormat.java.

Member Function Documentation

◆ getTypeName()

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

Definition at line 1212 of file JsonFormat.java.

◆ parser()

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

Creates a Parser with default configuration.

Definition at line 356 of file JsonFormat.java.

◆ printer()

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

Creates a Printer with default configurations.

Definition at line 109 of file JsonFormat.java.

◆ unsignedToString() [1/2]

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

Convert an unsigned 32-bit integer to a string.

Definition at line 1193 of file JsonFormat.java.

◆ unsignedToString() [2/2]

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

Convert an unsigned 64-bit integer to a string.

Definition at line 1202 of file JsonFormat.java.

Member Data Documentation

◆ logger

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

Definition at line 102 of file JsonFormat.java.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08