public class JsonReader extends JsonReaderSupport implements RecordReader
RecordReader implementation for JSON formatted records.JsonRecordParserFactoryeof, in| Constructor and Description |
|---|
JsonReader(Reader in)
Constructs a new JsonReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this input stream.
|
int |
getRecordLineNumber()
Returns the line number of the last record from this input stream.
|
String |
getRecordText()
Returns the unparsed record text of the last record read.
|
static void |
main(String[] args) |
Map<String,Object> |
read()
Reads a single record from this input stream.
|
isWhitespace, parseValue, readArray, readObject, readString, readUnicode, setReaderpublic Map<String,Object> read() throws IOException, RecordIOException
RecordReaderread in interface RecordReaderIOException - if an I/O error occurs reading from the streamRecordIOException - if the record is malformed and cannot
be parsed, but subsequent reads may still be possiblepublic void close()
throws IOException
RecordReaderclose in interface RecordReaderIOException - if an I/O error occurs closing the streampublic int getRecordLineNumber()
RecordReadergetRecordLineNumber in interface RecordReaderpublic String getRecordText()
RecordReadergetRecordText in interface RecordReader