Object read() {
try (Reader inputReader = new InputStreamReader(connection.getInputStream(), "UTF-8")) {
JSONParser parser = new JSONParser();
return parser.parse(inputReader);
} catch (ParseException e) {
throw new UpdaterException("Unable to parse JSON due to exception " + e.getMessage(), e);
} catch (UnsupportedEncodingException e) {
throw new UpdaterException("Unable to parse JSON because UTF-8 encoding is unsupported, this should not be possible!", e);
} catch (IOException e) {
throw new UpdaterException("Unable to read data from URL " + apiUrl.toString() + " due to exception " + e.getMessage(), e);
}
}