public class JsonEncoder extends AbstractEncoder
JsonEncoder
converts events from Couchbase to JSON.
If the document body looks like JSON, it inserts it as a sub-tree of the resulting object,
otherwise, it puts it as a String.Constructor and Description |
---|
JsonEncoder(kafka.utils.VerifiableProperties properties) |
Modifier and Type | Method and Description |
---|---|
byte[] |
toBytes(DCPEvent value)
Encodes
DCPEvent to JSON object. |
public byte[] toBytes(DCPEvent value)
DCPEvent
to JSON object.toBytes
in interface kafka.serializer.Encoder<DCPEvent>
toBytes
in class AbstractEncoder
value
- event from Couchbase.Copyright © 2015 Couchbase, Inc.