src/main/java/com/github/jreddit/parser/util/JsonUtils.java
public static Integer safeJsonToInteger(Object obj) {
        Integer intValue = null;

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

        return intValue;
    }
public static Integer safeJsonToInteger(Object obj) {
        Integer intValue = null;

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

        return intValue;
    }
public static Integer safeJsonToInteger ( Object obj ) { Integer intValue = null ; try { String str = safeJsonToString ( obj ) ; intValue = str != null ? Integer . parseInt ( str ) : null ; } catch ( NumberFormatException e ) { LOGGER . warn ( "Safe JSON conversion to Integer failed" , e ) ; } return intValue ; }
Safely converts an object into an integer

@param obj The object to convert.
@return an Integer representing the integer value of the Object (null if the object cannot be converted to an Integer)
Safely converts an object into an integer