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