src/main/java/com/github/jreddit/parser/util/JsonUtils.java
public static Long safeJsonToLong(Object obj) {
        Long longValue = null;

        try {
            String str = safeJsonToString(obj);
            longValue = str != null ? Long.parseLong(str) : null;
        } catch (NumberFormatException e) {
            LOGGER.warn("Safe JSON conversion to Long failed", e);
        }

        return longValue;
    }
public static Long safeJsonToLong(Object obj) {
        Long longValue = null;

        try {
            String str = safeJsonToString(obj);
            longValue = str != null ? Long.parseLong(str) : null;
        } catch (NumberFormatException e) {
            LOGGER.warn("Safe JSON conversion to Long failed", e);
        }

        return longValue;
    }
Safely converts an object into an long

@param obj The object to convert.
@return a Long representing the long value of the Object (null if the object cannot be converted to Long)