Class ProtobufSchemaUtils

java.lang.Object
io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaUtils

public class ProtobufSchemaUtils extends Object
  • Constructor Details

    • ProtobufSchemaUtils

      public ProtobufSchemaUtils()
  • Method Details

    • copyOf

      public static ProtobufSchema copyOf(ProtobufSchema schema)
    • getSchema

      public static ProtobufSchema getSchema(com.google.protobuf.Message message)
    • 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

      public static byte[] toJson(com.google.protobuf.Message message) throws IOException
      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

      public static com.fasterxml.jackson.databind.JsonNode findMatchingNodeHelper(com.fasterxml.jackson.databind.JsonNode node, String arrayField, String targetFieldName, String targetFieldValue)
    • findMatchingNode

      public static com.fasterxml.jackson.databind.JsonNode findMatchingNode(com.fasterxml.jackson.databind.JsonNode node, String[] identifiers, boolean isFieldPath)
    • findMatchingMessage

      public static com.squareup.wire.schema.internal.parser.MessageElement findMatchingMessage(List<com.squareup.wire.schema.internal.parser.TypeElement> typeElementList, String name)
    • findMatchingElement

      public static Object findMatchingElement(com.squareup.wire.schema.internal.parser.ProtoFileElement original, String[] identifiers, boolean isFieldPath)
    • toNormalizedString

      protected static String toNormalizedString(ProtobufSchema schema)
    • toFormattedString

      protected static String toFormattedString(ProtobufSchemaUtils.FormatContext ctx, ProtobufSchema schema)
    • toString

      protected static String toString(com.squareup.wire.schema.internal.parser.ProtoFileElement protoFile)
    • escapeChars

      public static String escapeChars(String input)