public static JSONPath compile(String path, boolean ignoreNullValue) {
        if (path == null) {
            throw new JSONPathException("jsonpath can not be null");
        }

        JSONPath jsonpath = pathCache.get(path);
        if (jsonpath == null) {
            jsonpath = new JSONPath(path, ignoreNullValue);
            if (pathCache.size() < 1024) {
                pathCache.putIfAbsent(path, jsonpath);
                jsonpath = pathCache.get(path);
            }
        }
        return jsonpath;
    }
Compile jsonPath and use it to extract keySet or field names from rootObject.

@param rootObject Can be a map or custom object. Array and Collection are not supported.
@param path JSONPath string to be compiled.
@return Set of keys, or <code>null</code> if not supported.
src/main/java/com/alibaba/fastjson/JSONPath.java