public Set<?> keySet(Object rootObject) {
        if (rootObject == null) {
            return null;
        }

        init();

        Object currentObject = rootObject;
        for (int i = 0; i < segments.length; ++i) {
            currentObject = segments[i].eval(this, rootObject, currentObject);
        }

        return evalKeySet(currentObject);
    }
Extract keySet or field names from rootObject on this JSONPath.

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