private < T > T readJsonObject ( final String url , final Class < T > object ) throws MovieMeterException { final String page = requestWebPage ( url ) ; if ( StringUtils . isNotBlank ( page ) ) { try { return mapper . readValue ( page , object ) ; } catch ( IOException ex ) { throw new MovieMeterException ( ApiExceptionType . MAPPING_FAILED , "Failed to read JSON object" , url , ex ) ; } } throw new MovieMeterException ( ApiExceptionType . MAPPING_FAILED , "Failed to read JSON object" , url ) ; }
Get the information for a URL and process into an object