Class JsonFormat.TypeRegistry (3.19.4)

public static class JsonFormat.TypeRegistry

A TypeRegistry is used to resolve Any messages in the JSON conversion. You must provide a TypeRegistry containing all message types used in Any message fields, or the JSON conversion will fail because data in Any message fields is unrecognizable. You don't need to supply a TypeRegistry if you don't use Any message fields.

Inheritance

java.lang.Object > JsonFormat.TypeRegistry

Static Methods

getEmptyTypeRegistry()

public static JsonFormat.TypeRegistry getEmptyTypeRegistry()
Returns
Type Description
JsonFormat.TypeRegistry

newBuilder()

public static JsonFormat.TypeRegistry.Builder newBuilder()
Returns
Type Description
JsonFormat.TypeRegistry.Builder

Methods

find(String name)

public Descriptors.Descriptor find(String name)

Find a type by its full name. Returns null if it cannot be found in this TypeRegistry.

Parameter
Name Description
name String
Returns
Type Description
Descriptors.Descriptor