result.setProjectId(JsonInput.getIntOrNull(object, "project_id"));
return result;
}
public static News parseNews(JSONObject object) throws JSONException {
final News result = NewsFactory.create(JsonInput.getIntOrNull(object, "id"));
result.setProject(JsonInput.getObjectOrNull(object, "project",
MINIMAL_PROJECT_PARSER));
result.setUser(JsonInput.getObjectOrNull(object, "author", USER_PARSER));
result.setTitle(JsonInput.getStringOrNull(object, "title"));
result.setDescription(JsonInput.getStringOrNull(object, "description"));
result.setCreatedOn(getDateOrNull(object, "created_on"));
result.setLink(JsonInput.getStringOrNull(object, "link"));
return result;
}