Class JsonReader

  • All Implemented Interfaces:
    InputEntityReader

    public class JsonReader
    extends IntermediateRowParsingReader<String>
    In contrast to JsonLineReader which processes input text line by line independently, this class tries to parse the input text as a whole to an array of objects. The input text can be: 1. a JSON string of an object in a line or multiple lines(such as pretty-printed JSON text) 2. multiple JSON object strings concated by white space character(s) For case 2, what should be noticed is that if an exception is thrown when parsing one JSON string, the rest JSON text will all be ignored For more information, see: https://github.com/apache/druid/pull/10383