Package com.google.protobuf.util
Class JsonFormat.TypeRegistry
java.lang.Object
com.google.protobuf.util.JsonFormat.TypeRegistry
- Enclosing class:
JsonFormat
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 ClassesModifier and TypeClassDescriptionstatic class
A Builder is used to buildJsonFormat.TypeRegistry
.private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFind a type by its full name.(package private) Descriptors.Descriptor
getDescriptorForTypeUrl
(String typeUrl) static JsonFormat.TypeRegistry
-
Field Details
-
types
-
-
Constructor Details
-
TypeRegistry
-
-
Method Details
-
getEmptyTypeRegistry
-
newBuilder
-
find
Find a type by its full name. Returns null if it cannot be found in thisJsonFormat.TypeRegistry
. -
getDescriptorForTypeUrl
@Nullable Descriptors.Descriptor getDescriptorForTypeUrl(String typeUrl) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-