public class JsonRecordParserFactory extends JsonParserConfiguration implements RecordParserFactory
RecordParserFactory for JSON formatted streams.
Record objects are stored using a Map. A map may contain List
values for a JSON array, another Map for a JSON object, or the simple
types String, Number, Boolean or null.
| Constructor and Description |
|---|
JsonRecordParserFactory()
Constructs a new JsonRecordParserFactory.
|
| Modifier and Type | Method and Description |
|---|---|
RecordMarshaller |
createMarshaller()
Creates a parser for marshalling records.
|
RecordReader |
createReader(Reader in)
Creates a parser for reading records from an input stream.
|
RecordUnmarshaller |
createUnmarshaller()
Creates a parser for unmarshalling records.
|
RecordWriter |
createWriter(Writer out)
Creates a parser for writing records to an output stream.
|
void |
init()
Initializes the factory.
|
getIndentation, getLineSeparator, isPretty, setIndentation, setLineSeparator, setPrettypublic JsonRecordParserFactory()
public void init()
throws IllegalArgumentException
RecordParserFactoryinit in interface RecordParserFactoryIllegalArgumentException - if the parser configuration is invalidpublic RecordReader createReader(Reader in) throws IllegalArgumentException
RecordParserFactorycreateReader in interface RecordParserFactoryin - the input stream to read fromRecordReaderIllegalArgumentException - if this factory is improperly configured
and a RecordReader cannot be createdpublic RecordWriter createWriter(Writer out) throws IllegalArgumentException
RecordParserFactorycreateWriter in interface RecordParserFactoryout - the output stream to write toRecordWriterIllegalArgumentException - if this factory is improperly configured
and a RecordWriter cannot be createdpublic RecordMarshaller createMarshaller() throws IllegalArgumentException
RecordParserFactorycreateMarshaller in interface RecordParserFactoryRecordMarshallerIllegalArgumentException - if this factory is improperly configured and
a RecordMarshaller cannot be createdpublic RecordUnmarshaller createUnmarshaller() throws IllegalArgumentException
RecordParserFactorycreateUnmarshaller in interface RecordParserFactoryRecordUnmarshallerIllegalArgumentException - if this factory is improperly configured and
a RecordUnmarshaller cannot be created