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

Public Member Functions

Parser ignoringUnknownFields ()
 
Parser ignoringUnknownFields ()
 
void merge (Reader json, Message.Builder builder) throws IOException
 
void merge (Reader json, Message.Builder builder) throws IOException
 
void merge (String json, Message.Builder builder) throws InvalidProtocolBufferException
 
void merge (String json, Message.Builder builder) throws InvalidProtocolBufferException
 
Parser usingTypeRegistry (com.google.protobuf.TypeRegistry registry)
 
Parser usingTypeRegistry (com.google.protobuf.TypeRegistry registry)
 
Parser usingTypeRegistry (TypeRegistry oldRegistry)
 
Parser usingTypeRegistry (TypeRegistry oldRegistry)
 

Private Member Functions

 Parser (com.google.protobuf.TypeRegistry registry, TypeRegistry oldRegistry, boolean ignoreUnknownFields, int recursionLimit)
 
 Parser (com.google.protobuf.TypeRegistry registry, TypeRegistry oldRegistry, boolean ignoreUnknownFields, int recursionLimit)
 

Private Attributes

final boolean ignoringUnknownFields
 
final TypeRegistry oldRegistry
 
final int recursionLimit
 
final com.google.protobuf.TypeRegistry registry
 

Static Private Attributes

static final int DEFAULT_RECURSION_LIMIT = 100
 

Detailed Description

A Parser parses JSON to protobuf message.

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

Constructor & Destructor Documentation

◆ Parser() [1/2]

com.google.protobuf.util.JsonFormat.Parser.Parser ( com.google.protobuf.TypeRegistry  registry,
TypeRegistry  oldRegistry,
boolean  ignoreUnknownFields,
int  recursionLimit 
)
inlineprivate

◆ Parser() [2/2]

com.google.protobuf.util.JsonFormat.Parser.Parser ( com.google.protobuf.TypeRegistry  registry,
TypeRegistry  oldRegistry,
boolean  ignoreUnknownFields,
int  recursionLimit 
)
inlineprivate

Member Function Documentation

◆ ignoringUnknownFields() [1/2]

Parser com.google.protobuf.util.JsonFormat.Parser.ignoringUnknownFields ( )
inline

Creates a new Parser configured to not throw an exception when an unknown field is encountered. The new Parser clones all other configurations from this Parser.

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

◆ ignoringUnknownFields() [2/2]

Parser com.google.protobuf.util.JsonFormat.Parser.ignoringUnknownFields ( )
inline

Creates a new Parser configured to not throw an exception when an unknown field is encountered. The new Parser clones all other configurations from this Parser.

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

◆ merge() [1/4]

void com.google.protobuf.util.JsonFormat.Parser.merge ( Reader  json,
Message.Builder  builder 
) throws IOException
inline

Parses from JSON into a protobuf message.

Exceptions
InvalidProtocolBufferExceptionif the input is not valid JSON format or there are unknown fields in the input.
IOExceptionif reading from the input throws.

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

◆ merge() [2/4]

void com.google.protobuf.util.JsonFormat.Parser.merge ( Reader  json,
Message.Builder  builder 
) throws IOException
inline

Parses from JSON into a protobuf message.

Exceptions
InvalidProtocolBufferExceptionif the input is not valid JSON format or there are unknown fields in the input.
IOExceptionif reading from the input throws.

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

◆ merge() [3/4]

void com.google.protobuf.util.JsonFormat.Parser.merge ( String  json,
Message.Builder  builder 
) throws InvalidProtocolBufferException
inline

Parses from JSON into a protobuf message.

Exceptions
InvalidProtocolBufferExceptionif the input is not valid JSON format or there are unknown fields in the input.

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

◆ merge() [4/4]

void com.google.protobuf.util.JsonFormat.Parser.merge ( String  json,
Message.Builder  builder 
) throws InvalidProtocolBufferException
inline

Parses from JSON into a protobuf message.

Exceptions
InvalidProtocolBufferExceptionif the input is not valid JSON format or there are unknown fields in the input.

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

◆ usingTypeRegistry() [1/4]

Parser com.google.protobuf.util.JsonFormat.Parser.usingTypeRegistry ( com.google.protobuf.TypeRegistry  registry)
inline

Creates a new Parser using the given registry. The new Parser clones all other configurations from this Parser.

Exceptions
IllegalArgumentExceptionif a registry is already set.

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

◆ usingTypeRegistry() [2/4]

Parser com.google.protobuf.util.JsonFormat.Parser.usingTypeRegistry ( com.google.protobuf.TypeRegistry  registry)
inline

Creates a new Parser using the given registry. The new Parser clones all other configurations from this Parser.

Exceptions
IllegalArgumentExceptionif a registry is already set.

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

◆ usingTypeRegistry() [3/4]

Parser com.google.protobuf.util.JsonFormat.Parser.usingTypeRegistry ( TypeRegistry  oldRegistry)
inline

Creates a new Parser using the given registry. The new Parser clones all other configurations from this Parser.

Exceptions
IllegalArgumentExceptionif a registry is already set.

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

◆ usingTypeRegistry() [4/4]

Parser com.google.protobuf.util.JsonFormat.Parser.usingTypeRegistry ( TypeRegistry  oldRegistry)
inline

Creates a new Parser using the given registry. The new Parser clones all other configurations from this Parser.

Exceptions
IllegalArgumentExceptionif a registry is already set.

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

Member Data Documentation

◆ DEFAULT_RECURSION_LIMIT

static final int com.google.protobuf.util.JsonFormat.Parser.DEFAULT_RECURSION_LIMIT = 100
staticprivate

◆ ignoringUnknownFields

final boolean com.google.protobuf.util.JsonFormat.Parser.ignoringUnknownFields
private

◆ oldRegistry

final TypeRegistry com.google.protobuf.util.JsonFormat.Parser.oldRegistry
private

◆ recursionLimit

final int com.google.protobuf.util.JsonFormat.Parser.recursionLimit
private

◆ registry

final com google protobuf TypeRegistry com.google.protobuf.util.JsonFormat.Parser.registry
private

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


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