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