try {
final int id = Integer.parseInt(key);
final Transition transition = transitionJsonParser.parse(jsonObject.getJSONObject(key), id);
transitions.add(transition);
} catch (JSONException e) {
throw new RestClientException(e);
} catch (NumberFormatException e) {
throw new RestClientException("Transition id should be an integer, but found [" + key + "]", e);
}
}
return transitions;
}
}