Class JsonSchemaUtils
java.lang.Object
io.confluent.kafka.schemaregistry.json.JsonSchemaUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ObjectNodecopyEnvelopeWithoutPayload(com.fasterxml.jackson.databind.node.ObjectNode jsonValue) static JsonSchemacopyOf(JsonSchema schema) static com.fasterxml.jackson.databind.node.ObjectNodeenvelope(com.fasterxml.jackson.databind.JsonNode schema, com.fasterxml.jackson.databind.JsonNode payload) static com.fasterxml.jackson.databind.node.ObjectNodeenvelope(com.fasterxml.jackson.databind.JsonNode schema, List<SchemaReference> references, Map<String, com.fasterxml.jackson.databind.JsonNode> resolvedReferences, com.fasterxml.jackson.databind.JsonNode payload) static com.fasterxml.jackson.databind.node.ObjectNodeenvelope(JsonSchema schema, com.fasterxml.jackson.databind.JsonNode payload) static com.fasterxml.jackson.databind.JsonNodefindMatchingEntity(com.fasterxml.jackson.databind.JsonNode node, SchemaEntity entity) static com.fasterxml.jackson.databind.JsonNodefindNodeFromNameBuilder(com.fasterxml.jackson.databind.JsonNode node, LinkedList<String> identifiersList) static JsonSchemastatic JsonSchemagetSchema(Object object, SchemaRegistryClient client) static JsonSchemagetSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, boolean failUnknownProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) static JsonSchemagetSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, boolean failUnknownProperties, SchemaRegistryClient client) static JsonSchemagetSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) static JsonSchemagetSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, SchemaRegistryClient client) static JsonSchemagetSchema(Object object, SpecificationVersion specVersion, List<String> scanPackages, boolean useOneofForNullables, boolean failUnknownProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) static Objectstatic booleanisEnvelope(Object object) static byte[]static ObjecttoObject(com.fasterxml.jackson.databind.JsonNode value, JsonSchema schema) static ObjecttoObject(com.fasterxml.jackson.databind.JsonNode value, JsonSchema schema, boolean validate) static ObjecttoObject(String value, JsonSchema schema) static ObjecttoObject(String value, JsonSchema schema, boolean validate)
-
Constructor Details
-
JsonSchemaUtils
public JsonSchemaUtils()
-
-
Method Details
-
envelope
public static com.fasterxml.jackson.databind.node.ObjectNode envelope(JsonSchema schema, com.fasterxml.jackson.databind.JsonNode payload) -
envelope
public static com.fasterxml.jackson.databind.node.ObjectNode envelope(com.fasterxml.jackson.databind.JsonNode schema, com.fasterxml.jackson.databind.JsonNode payload) -
envelope
public static com.fasterxml.jackson.databind.node.ObjectNode envelope(com.fasterxml.jackson.databind.JsonNode schema, List<SchemaReference> references, Map<String, com.fasterxml.jackson.databind.JsonNode> resolvedReferences, com.fasterxml.jackson.databind.JsonNode payload) -
isEnvelope
-
copyEnvelopeWithoutPayload
public static com.fasterxml.jackson.databind.node.ObjectNode copyEnvelopeWithoutPayload(com.fasterxml.jackson.databind.node.ObjectNode jsonValue) -
copyOf
-
getSchema
- Throws:
IOException
-
getSchema
- Throws:
IOException
-
getSchema
public static JsonSchema getSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, SchemaRegistryClient client) throws IOException - Throws:
IOException
-
getSchema
public static JsonSchema getSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, boolean failUnknownProperties, SchemaRegistryClient client) throws IOException - Throws:
IOException
-
getSchema
public static JsonSchema getSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) throws IOException - Throws:
IOException
-
getSchema
public static JsonSchema getSchema(Object object, SpecificationVersion specVersion, boolean useOneofForNullables, boolean failUnknownProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) throws IOException - Throws:
IOException
-
getSchema
public static JsonSchema getSchema(Object object, SpecificationVersion specVersion, List<String> scanPackages, boolean useOneofForNullables, boolean failUnknownProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaRegistryClient client) throws IOException - Throws:
IOException
-
getValue
-
toObject
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, JsonSchema schema) throws IOException - Throws:
IOException
-
toObject
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, JsonSchema schema, boolean validate) throws IOException - Throws:
IOException
-
toObject
- Throws:
IOException
-
toObject
- Throws:
IOException
-
toJson
- Throws:
IOException
-
findMatchingEntity
public static com.fasterxml.jackson.databind.JsonNode findMatchingEntity(com.fasterxml.jackson.databind.JsonNode node, SchemaEntity entity) -
findNodeFromNameBuilder
public static com.fasterxml.jackson.databind.JsonNode findNodeFromNameBuilder(com.fasterxml.jackson.databind.JsonNode node, LinkedList<String> identifiersList)
-