public interface AvroTypeConverter
| Modifier and Type | Interface and Description |
|---|---|
static class |
AvroTypeConverter.Incompatible |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
used to know if this class can convert the json value to the avro value
|
java.lang.Object |
convert(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
java.lang.Object jsonValue,
java.util.Deque<java.lang.String> path,
boolean silently)
convert the json jsonValue to the avro jsonValue
|
static boolean |
isLogicalType(org.apache.avro.Schema schema,
java.lang.String logicalType) |
java.lang.Object convert(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
java.lang.Object jsonValue,
java.util.Deque<java.lang.String> path,
boolean silently)
field - the field to convertschema - the schema of the fieldjsonValue - the json jsonValuepath - the path of the fieldsilently - should be false to throw an error in case of incompatible java type for the avro typeboolean canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
schema - the avro schema in which to convert the jsonpath - the path of the current field. Can be used to define a specific converter for a pathstatic boolean isLogicalType(org.apache.avro.Schema schema,
java.lang.String logicalType)