Package com.google.protobuf.util
Class JsonFormat.TypeRegistry
- java.lang.Object
-
- com.google.protobuf.util.JsonFormat.TypeRegistry
-
- Enclosing class:
- JsonFormat
public static class JsonFormat.TypeRegistry extends Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonFormat.TypeRegistry.BuilderA Builder is used to buildJsonFormat.TypeRegistry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.protobuf.Descriptors.Descriptorfind(String name)Find a type by its full name.static JsonFormat.TypeRegistrygetEmptyTypeRegistry()static JsonFormat.TypeRegistry.BuildernewBuilder()
-
-
-
Method Detail
-
getEmptyTypeRegistry
public static JsonFormat.TypeRegistry getEmptyTypeRegistry()
-
newBuilder
public static JsonFormat.TypeRegistry.Builder newBuilder()
-
find
@Nullable public com.google.protobuf.Descriptors.Descriptor find(String name)
Find a type by its full name. Returns null if it cannot be found in thisJsonFormat.TypeRegistry.
-
-