@Override public Object readRoot(String[] paths, Predicate... filters) { if (null == paths || paths.length == 0) { throw new IllegalArgumentException(); } final Cache cache = CacheProvider.getCache(); final List<Predicate> filterStack = new LinkedList<Predicate>(asList(filters)); ; Object ret = null; Object rootObj = null; for (String path : paths) { path = path.trim(); String cacheKey = Utils.concat(path, filterStack.toString()); JsonPath jsonPath = cache.get(cacheKey); if (jsonPath == null) { jsonPath = compile(path, filters); cache.put(cacheKey, jsonPath); } ret = jsonPath.readRoot(rootObj, json, configuration); rootObj = ret; } return ret; }