Package org.nuxeo.ecm.core.bulk.message
Class MapAsJsonAsStringEncoding
java.lang.Object
org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
org.nuxeo.ecm.core.bulk.message.MapAsJsonAsStringEncoding
public class MapAsJsonAsStringEncoding
extends org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
This
CustomEncoding
encodes/decodes Map
<String
, Serializable
> to a JSON
String
using Jackson before encoding it in Avro format.- Since:
- 10.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapper
protected static final int
protected static final int
Fields inherited from class org.apache.avro.reflect.CustomEncoding
schema
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.avro.reflect.CustomEncoding
getSchema
-
Field Details
-
NULL_SCHEMA_INDEX
protected static final int NULL_SCHEMA_INDEX- See Also:
-
STRING_SCHEMA_INDEX
protected static final int STRING_SCHEMA_INDEX- See Also:
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Constructor Details
-
MapAsJsonAsStringEncoding
public MapAsJsonAsStringEncoding()
-
-
Method Details
-
write
- Specified by:
write
in classorg.apache.avro.reflect.CustomEncoding<Map<String,
Serializable>> - Throws:
IOException
-
read
protected Map<String,Serializable> read(Object o, org.apache.avro.io.Decoder decoder) throws IOException - Specified by:
read
in classorg.apache.avro.reflect.CustomEncoding<Map<String,
Serializable>> - Throws:
IOException
-