public class AvroSchemaUtils extends Object
| Constructor and Description |
|---|
AvroSchemaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addLogicalTypeConversion(org.apache.avro.generic.GenericData avroData) |
static void |
clearThreadLocalData() |
static AvroSchema |
copyOf(AvroSchema schema) |
static com.fasterxml.jackson.databind.JsonNode |
findMatchingEntity(com.fasterxml.jackson.databind.JsonNode node,
SchemaEntity entity) |
static org.apache.avro.generic.GenericData |
getData(org.apache.avro.Schema schema,
Object message,
boolean useLogicalTypes,
boolean allowNull) |
static org.apache.avro.io.DatumWriter<?> |
getDatumWriter(Object value,
org.apache.avro.Schema schema,
boolean avroUseLogicalTypeConverters) |
static org.apache.avro.io.DatumWriter<?> |
getDatumWriter(Object value,
org.apache.avro.Schema schema,
boolean useLogicalTypes,
boolean allowNull) |
static org.apache.avro.generic.GenericData |
getGenericData() |
static org.apache.avro.generic.GenericData |
getGenericData(boolean useLogicalTypes) |
static Map<String,org.apache.avro.Schema> |
getPrimitiveSchemas() |
static org.apache.avro.reflect.ReflectData |
getReflectData() |
static org.apache.avro.reflect.ReflectData |
getReflectData(boolean useLogicalTypes,
boolean allowNull) |
static org.apache.avro.reflect.ReflectData |
getReflectDataAllowNull() |
static org.apache.avro.Schema |
getSchema(Object object) |
static org.apache.avro.Schema |
getSchema(Object object,
boolean useReflection,
boolean reflectionAllowNull,
boolean removeJavaProperties) |
static org.apache.avro.Schema |
getSchema(Object object,
boolean useReflection,
boolean reflectionAllowNull,
boolean removeJavaProperties,
boolean throwError) |
static org.apache.avro.Schema |
getSchema(Object object,
boolean useReflection,
boolean reflectionAllowNull,
boolean useLogicalTypeConverters,
boolean removeJavaProperties,
boolean throwError) |
static org.apache.avro.specific.SpecificData |
getSpecificData() |
static <T> org.apache.avro.specific.SpecificData |
getSpecificDataForClass(Class<T> c) |
static org.apache.avro.specific.SpecificData |
getSpecificDataForSchema(org.apache.avro.Schema reader) |
static org.apache.avro.specific.SpecificData |
getSpecificDataForSchema(org.apache.avro.Schema reader,
boolean useLogicalTypes) |
static org.apache.avro.generic.GenericData |
getThreadLocalGenericData() |
static org.apache.avro.reflect.ReflectData |
getThreadLocalReflectData() |
static org.apache.avro.specific.SpecificData |
getThreadLocalSpecificData() |
static void |
setThreadLocalData(org.apache.avro.Schema schema,
boolean useLogicaltypes,
boolean allowNull) |
static byte[] |
toJson(Object value) |
static void |
toJson(Object value,
OutputStream out) |
protected static String |
toNormalizedString(AvroSchema schema) |
static Object |
toObject(com.fasterxml.jackson.databind.JsonNode value,
AvroSchema schema) |
static Object |
toObject(com.fasterxml.jackson.databind.JsonNode value,
AvroSchema schema,
org.apache.avro.io.DatumReader<Object> reader) |
static Object |
toObject(String value,
AvroSchema schema) |
static Object |
toObject(String value,
AvroSchema schema,
org.apache.avro.io.DatumReader<Object> reader) |
public static void setThreadLocalData(org.apache.avro.Schema schema,
boolean useLogicaltypes,
boolean allowNull)
public static org.apache.avro.generic.GenericData getThreadLocalGenericData()
public static org.apache.avro.reflect.ReflectData getThreadLocalReflectData()
public static org.apache.avro.specific.SpecificData getThreadLocalSpecificData()
public static void clearThreadLocalData()
public static org.apache.avro.generic.GenericData getGenericData(boolean useLogicalTypes)
public static org.apache.avro.generic.GenericData getGenericData()
public static org.apache.avro.reflect.ReflectData getReflectData(boolean useLogicalTypes,
boolean allowNull)
public static org.apache.avro.reflect.ReflectData getReflectData()
public static org.apache.avro.reflect.ReflectData getReflectDataAllowNull()
public static org.apache.avro.specific.SpecificData getSpecificDataForSchema(org.apache.avro.Schema reader,
boolean useLogicalTypes)
public static org.apache.avro.specific.SpecificData getSpecificDataForSchema(org.apache.avro.Schema reader)
public static <T> org.apache.avro.specific.SpecificData getSpecificDataForClass(Class<T> c)
public static org.apache.avro.specific.SpecificData getSpecificData()
public static void addLogicalTypeConversion(org.apache.avro.generic.GenericData avroData)
public static AvroSchema copyOf(AvroSchema schema)
public static org.apache.avro.Schema getSchema(Object object)
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties)
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties, boolean throwError)
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean useLogicalTypeConverters, boolean removeJavaProperties, boolean throwError)
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema) throws IOException
IOExceptionpublic static Object toObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) throws IOException
IOExceptionpublic static Object toObject(String value, AvroSchema schema) throws IOException
IOExceptionpublic static Object toObject(String value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) throws IOException
IOExceptionpublic static byte[] toJson(Object value) throws IOException
IOExceptionpublic static void toJson(Object value, OutputStream out) throws IOException
IOExceptionpublic static org.apache.avro.generic.GenericData getData(org.apache.avro.Schema schema,
Object message,
boolean useLogicalTypes,
boolean allowNull)
public static org.apache.avro.io.DatumWriter<?> getDatumWriter(Object value, org.apache.avro.Schema schema, boolean avroUseLogicalTypeConverters)
public static org.apache.avro.io.DatumWriter<?> getDatumWriter(Object value, org.apache.avro.Schema schema, boolean useLogicalTypes, boolean allowNull)
public static com.fasterxml.jackson.databind.JsonNode findMatchingEntity(com.fasterxml.jackson.databind.JsonNode node,
SchemaEntity entity)
protected static String toNormalizedString(AvroSchema schema)
Copyright © 2025 Confluent, Inc.. All rights reserved.