public static TaskQueueStatistics fromJson ( final String json , final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { return objectMapper . readValue ( json , TaskQueueStatistics . class ) ; } catch ( final JsonMappingException | JsonParseException e ) { throw new ApiException ( e . getMessage ( ) , e ) ; } catch ( final IOException e ) { throw new ApiConnectionException ( e . getMessage ( ) , e ) ; } }
Converts a JSON String into a TaskQueueStatistics object using the provided ObjectMapper .