public class MapAsJsonAsStringEncoding extends org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
CustomEncoding encodes/decodes Map<String, Serializable> to a JSON
String using Jackson before encoding it in Avro format.| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
protected static int |
NULL_SCHEMA_INDEX |
protected static int |
STRING_SCHEMA_INDEX |
| Constructor and Description |
|---|
MapAsJsonAsStringEncoding() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Serializable> |
read(Object o,
org.apache.avro.io.Decoder decoder) |
protected void |
write(Object o,
org.apache.avro.io.Encoder encoder) |
protected static final int NULL_SCHEMA_INDEX
protected static final int STRING_SCHEMA_INDEX
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
public MapAsJsonAsStringEncoding()
protected void write(Object o, org.apache.avro.io.Encoder encoder) throws IOException
write in class org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>IOExceptionprotected Map<String,Serializable> read(Object o, org.apache.avro.io.Decoder decoder) throws IOException
read in class org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>IOExceptionCopyright © 2019 Nuxeo. All rights reserved.