@Tags(value={"json","tree","record","reader","parser"}) @CapabilityDescription(value="Parses JSON into individual Record objects. The Record that is produced will contain all top-level elements of the corresponding JSON Object. The root JSON element can be either a single element or an array of JSON elements, and each element in that array will be treated as a separate record. If the schema that is configured contains a field that is not present in the JSON, a null value will be used. If the JSON contains a field that is not present in the schema, that field will be skipped. See the Usage of the Controller Service for more information and examples.") @SeeAlso(value=JsonPathReader.class) public class JsonTreeReader extends SchemaRegistryService implements RecordReaderFactory
Modifier and Type | Field and Description |
---|---|
private String |
dateFormat |
private String |
timeFormat |
private String |
timestampFormat |
Constructor and Description |
---|
JsonTreeReader() |
Modifier and Type | Method and Description |
---|---|
RecordReader |
createRecordReader(FlowFile flowFile,
InputStream in,
ComponentLog logger) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
storeFormats(ConfigurationContext context) |
customValidate, getConfigurationContext, getDefaultSchemaAccessStrategy, getSchema, getSchemaAccessStrategy, getSchemaAccessStrategy, getSchemaAccessStrategy, getSchemaAccessStrategyValues, getSchemaAcessStrategyDescriptor, getSuppliedSchemaFields, storeSchemaAccessStrategy
abstractClearConfigContext, abstractStoreConfigContext, getControllerServiceLookup, getIdentifier, getLogger, getProperty, getStateManager, init, initialize
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
initialize
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private volatile String dateFormat
private volatile String timeFormat
private volatile String timestampFormat
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class SchemaRegistryService
@OnEnabled public void storeFormats(ConfigurationContext context)
public RecordReader createRecordReader(FlowFile flowFile, InputStream in, ComponentLog logger) throws IOException, MalformedRecordException, SchemaNotFoundException
createRecordReader
in interface RecordReaderFactory
IOException
MalformedRecordException
SchemaNotFoundException
Copyright © 2017 Apache NiFi Project. All rights reserved.