IN - The type to decode JSON intoOUT - The type to encode into JSONpublic class JsonCodec<IN,OUT> extends BufferCodec<IN,OUT>
DEFAULT_DELIMITER, delimiter| Constructor and Description |
|---|
JsonCodec(java.lang.Class<IN> inputType)
Creates a new
JsonCodec that will create instances of inputType when
decoding. |
JsonCodec(java.lang.Class<IN> inputType,
com.fasterxml.jackson.databind.Module customModule)
Creates a new
JsonCodec that will create instances of inputType when
decoding. |
JsonCodec(java.lang.Class<IN> inputType,
com.fasterxml.jackson.databind.Module customModule,
java.lang.Byte delimiter)
Creates a new
JsonCodec that will create instances of inputType when
decoding. |
| Modifier and Type | Method and Description |
|---|---|
Buffer |
apply(OUT out)
Execute the logic of the action, accepting the given parameter.
|
Function<Buffer,IN> |
decoder(Consumer<IN> next)
Provide the caller with a decoder to turn a source object into an instance of the input
type.
|
protected IN |
doBufferDecode(Buffer buffer)
Decode a buffer
|
decode, encodeaddDelimiterIfAny, decoder, doDelimitedBufferDecode, encoder, invokeCallbackOrReturnpublic JsonCodec(java.lang.Class<IN> inputType)
JsonCodec that will create instances of inputType when
decoding.inputType - The type to create when decoding.public JsonCodec(java.lang.Class<IN> inputType, com.fasterxml.jackson.databind.Module customModule)
JsonCodec that will create instances of inputType when
decoding. The customModule will be registered with the underlying ObjectMapper.inputType - The type to create when decoding.customModule - The module to register with the underlying ObjectMapperpublic JsonCodec(java.lang.Class<IN> inputType, com.fasterxml.jackson.databind.Module customModule, java.lang.Byte delimiter)
JsonCodec that will create instances of inputType when
decoding. The customModule will be registered with the underlying ObjectMapper.inputType - The type to create when decoding.customModule - The module to register with the underlying ObjectMapperdelimiter - A nullable delimiting byte for batch decodingprotected IN doBufferDecode(Buffer buffer)
CodecdoBufferDecode in class Codec<Buffer,IN,OUT>public Function<Buffer,IN> decoder(Consumer<IN> next)
Codec