Class JsonReader

All Implemented Interfaces:
InputConsumer

public class JsonReader extends ManagedBufferStreamer
A ManagedBufferStreamer that feeds the data to a JSON parser.

When the data is fully parsed, it is made available by firing a DataInput event.

Since:
2.8
  • Constructor Details

    • JsonReader

      public JsonReader(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<R> resultType, EventPipeline pipeline, Channel channel)
      Instantiates a new JSON reader.
      Type Parameters:
      R - the result data type
      Parameters:
      mapper - the mapper
      resultType - the result type
      pipeline - the pipeline to use for sending the DataInput event
      channel - the channel to use for sending the DataInput event
    • JsonReader

      public JsonReader(Class<R> resultType, EventPipeline pipeline, Channel channel)
      Instantiates a new JSON reader that uses a default object mapper.
      Type Parameters:
      R - the result data type
      Parameters:
      resultType - the result type
      pipeline - the pipeline to use for sending the DataInput event
      channel - the channel to use for sending the DataInput event