Class ProtobufSchemaUtils
java.lang.Object
io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtobufSchemacopyOf(ProtobufSchema schema) static StringescapeChars(String input) static ObjectfindMatchingElement(com.squareup.wire.schema.internal.parser.ProtoFileElement original, String[] identifiers, boolean isFieldPath) static com.squareup.wire.schema.internal.parser.MessageElementfindMatchingMessage(List<com.squareup.wire.schema.internal.parser.TypeElement> typeElementList, String name) static com.fasterxml.jackson.databind.JsonNodefindMatchingNode(com.fasterxml.jackson.databind.JsonNode node, String[] identifiers, boolean isFieldPath) static com.fasterxml.jackson.databind.JsonNodefindMatchingNodeHelper(com.fasterxml.jackson.databind.JsonNode node, String arrayField, String targetFieldName, String targetFieldValue) static ProtobufSchemagetSchema(com.google.protobuf.Message message) static com.squareup.wire.schema.internal.parser.ProtoFileElementjsonToFile(com.fasterxml.jackson.databind.JsonNode node) protected static Stringstatic byte[]toJson(com.google.protobuf.Message message) protected static StringtoNormalizedString(ProtobufSchema schema) static ObjecttoObject(com.fasterxml.jackson.databind.JsonNode value, ProtobufSchema schema) static ObjecttoObject(String value, ProtobufSchema schema) protected static StringtoString(com.squareup.wire.schema.internal.parser.ProtoFileElement protoFile)
-
Constructor Details
-
ProtobufSchemaUtils
public ProtobufSchemaUtils()
-
-
Method Details
-
copyOf
-
getSchema
-
toObject
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, ProtobufSchema schema) throws IOException - Throws:
IOException
-
toObject
public static Object toObject(String value, ProtobufSchema schema) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
toJson
- Throws:
IOException
-
jsonToFile
public static com.squareup.wire.schema.internal.parser.ProtoFileElement jsonToFile(com.fasterxml.jackson.databind.JsonNode node) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
findMatchingNodeHelper
-
findMatchingNode
public static com.fasterxml.jackson.databind.JsonNode findMatchingNode(com.fasterxml.jackson.databind.JsonNode node, String[] identifiers, boolean isFieldPath) -
findMatchingMessage
-
findMatchingElement
-
toNormalizedString
-
toFormattedString
protected static String toFormattedString(ProtobufSchemaUtils.FormatContext ctx, ProtobufSchema schema) -
toString
protected static String toString(com.squareup.wire.schema.internal.parser.ProtoFileElement protoFile) -
escapeChars
-