Search in sources :

Example 61 with JsonPath

use of com.jayway.jsonpath.JsonPath in project bender by Nextdoor.

the class JsonPathProvider method getPath.

private static JsonPath getPath(String pathStr) {
    JsonPath path;
    if ((path = CACHE.get(pathStr)) == null) {
        path = JsonPath.compile(pathStr);
        CACHE.put(pathStr, path);
    }
    return path;
}
Also used : JsonPath(com.jayway.jsonpath.JsonPath)

Aggregations

JsonPath (com.jayway.jsonpath.JsonPath)61 Test (org.junit.Test)34 PathNotFoundException (com.jayway.jsonpath.PathNotFoundException)13 BaseTest (com.jayway.jsonpath.BaseTest)12 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)9 ArrayList (java.util.ArrayList)9 LinkedHashMap (java.util.LinkedHashMap)8 List (java.util.List)8 Map (java.util.Map)8 DocumentContext (com.jayway.jsonpath.DocumentContext)6 IOException (java.io.IOException)6 ComponentLog (org.apache.nifi.logging.ComponentLog)6 File (java.io.File)5 Arrays (java.util.Arrays)5 HashMap (java.util.HashMap)5 Collectors (java.util.stream.Collectors)5 DataType (org.apache.nifi.serialization.record.DataType)5 RecordField (org.apache.nifi.serialization.record.RecordField)5 Assert.assertEquals (org.junit.Assert.assertEquals)5 Assert.assertTrue (org.junit.Assert.assertTrue)5