json-path/src/main/java/io/restassured/path/json/JsonPath.java
public long getLong(String path) {
        //The type returned from Groovy depends on the input, so we need to handle different numerical types.
        Object value = get(path);
        if (value instanceof Long) {
            return (Long) value;
        } else if (value instanceof Short) {
            return ((Short) value).longValue();
        } else if (value instanceof Integer) {
            return ((Integer) value).longValue();
        } else {
            return ObjectConverter.convertObjectTo(value, Long.class);
        }
    }
public long getLong(String path) {
        //The type returned from Groovy depends on the input, so we need to handle different numerical types.
        Object value = get(path);
        if (value instanceof Long) {
            return (Long) value;
        } else if (value instanceof Short) {
            return ((Short) value).longValue();
        } else if (value instanceof Integer) {
            return ((Integer) value).longValue();
        } else {
            return ObjectConverter.convertObjectTo(value, Long.class);
        }
    }
public long getLong ( String path ) { //The type returned from Groovy depends on the input, so we need to handle different numerical types. Object value = get ( path ) ; if ( value instanceof Long ) { return ( Long ) value ; } else if ( value instanceof Short ) { return ( ( Short ) value ) . longValue ( ) ; } else if ( value instanceof Integer ) { return ( ( Integer ) value ) . longValue ( ) ; } else { return ObjectConverter . convertObjectTo ( value , Long . class ) ; } }
Get the result of an Object path expression as a long.

@param path The Object path.
@return The object matching the Object path. A {@link java.lang.ClassCastException} will be thrown if the object
cannot be casted to the expected type.
Get the result of an Object path expression as a long .