USER_PARSER));
return result;
}
public static Version parseVersion(JSONObject content) throws JSONException {
final Version result = VersionFactory.create(JsonInput.getIntOrNull(content, "id"));
result.setProject(JsonInput.getObjectOrNull(content, "project",
MINIMAL_PROJECT_PARSER));
result.setName(JsonInput.getStringOrNull(content, "name"));
result.setDescription(JsonInput.getStringOrNull(content, "description"));
result.setSharing(JsonInput.getStringOrNull(content, "sharing"));
result.setStatus(JsonInput.getStringOrNull(content, "status"));
result.setDueDate(getShortDateOrNull(content, "due_date"));
result.setCreatedOn(getDateOrNull(content, "created_on"));
result.setUpdatedOn(getDateOrNull(content, "updated_on"));
result.addCustomFields(JsonInput.getListOrEmpty(content,
"custom_fields", RedmineJSONParser.CUSTOM_FIELD_PARSER));
return result;
}