[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16475810#comment-16475810 ]
ASF GitHub Bot commented on NIFI-5169: -------------------------------------- Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/nifi/pull/2705#discussion_r188281072 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java --- @@ -112,10 +111,10 @@ static String getResultRepresentation(Object jsonPathResult, String defaultValue public ValidationResult validate(final String subject, final String input, final ValidationContext context) { String error = null; if (isStale(subject, input)) { - if (JsonPathExpressionValidator.isValidExpression(input)) { + try { JsonPath compiledJsonPath = JsonPath.compile(input); cacheComputedValue(subject, input, compiledJsonPath); --- End diff -- This throws an IllegalArgumentException if the input is null, and an InvalidPathException if the compile is wrong. Maybe we should catch the explicit exception? This is a nit I know. > Upgrade to JsonPath 2.4.0 > ------------------------- > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task > Affects Versions: 1.6.0 > Reporter: Dennis Dahlmann > Assignee: Mike Thomsen > Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)