Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.1.0, 0.0.2
-
None
Description
The EvaluateJsonPath processor fails with a NullPointerException when the input JSON has a null value in the contents of a field it is evaluating.
Caused by: java.lang.NullPointerException at org.apache.nifi.processors.standard.AbstractJsonPathProcessor.getResultRepresentation(AbstractJsonPathProcessor.java:84) at org.apache.nifi.processors.standard.EvaluateJsonPath.onTrigger(EvaluateJsonPath.java:268) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
null is a valid value in the JSON spec
The current spec of EvaluateJsonPath from NIFI-360 indicated that any missing fields should be given an empty string attribute value in the output flow file sent to "match".
null values should either follow this same pattern, or perhaps allow for null values in the output FlowFile attributes to properly indicate the difference between null and an empty String. Either way, EvaluateJsonPath should handle null input values instead of throwing exceptions.
Attachments
Attachments
Issue Links
- relates to
-
NIFI-360 Create Processors to work against JSON data
- Resolved