public interface JsonToAvroReader
| Modifier and Type | Method and Description |
|---|---|
org.apache.avro.generic.GenericData.Record |
read(java.util.Map<java.lang.String,java.lang.Object> json,
org.apache.avro.Schema schema)
convert a Map to a generic record
|
java.lang.Object |
read(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
java.lang.Object jsonValue,
java.util.Deque<java.lang.String> path,
boolean silently)
allow to convert a json field to type corresponding avro type
|
org.apache.avro.generic.GenericData.Record read(java.util.Map<java.lang.String,java.lang.Object> json,
org.apache.avro.Schema schema)
json - the json to convertschema - the avro schema to usejava.lang.Object read(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 avro field to createschema - the schema associated to the fieldjsonValue - the json jsonValue of the fieldpath - the path of the field on the jsonsilently - should be false to throw an error in case of incompatible java type for the avro type