public int size(Object rootObject) {
        if (rootObject == null) {
            return -1;
        }

        init();

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

        return evalSize(currentObject);
    }
@since 1.2.76
@param rootObject
@param clazz
@return
src/main/java/com/alibaba/fastjson/JSONPath.java