this.endDate = new DateTime(json.get("endDate").asLong());
this.url = json.path("url").asText();
this.place = json.path("place").asText();
this.address = json.path("address").asText();
this.description = json.get("description").asText();
JsonNode hashTagProp = json.path("hashTag");
this.hashTag = hashTagProp.isNull() ? null : hashTagProp.asText();
this.ownerId = json.get("ownerId").asText();
this.foreImageId = Strings.emptyToNull(json.path("foreImageId").asText());
this.backImageId = Strings.emptyToNull(json.path("backImageId").asText());
JsonNode passcodeProp = json.path("passcode");
this.passcode = passcodeProp.isNull() ? null : passcodeProp.asText();
this.draft = json.path("draft").asBoolean(false);
{
JsonNode ar = json.get("editorIds");
if (ar != null) {
this.editorIds = new ArrayList<String>();
for (int i = 0; i < ar.size(); ++i)
editorIds.add(ar.get(i).asText());
}
}
{
JsonNode ar = json.get("relatedEventIds");
if (ar != null) {
this.relatedEventIds = new ArrayList<String>();
for (int i = 0; i < ar.size(); ++i)
relatedEventIds.add(ar.get(i).asText());
}
}
{
JsonNode ar = json.get("enquetes");
if (ar != null) {
this.enquetes = new ArrayList<EnqueteQuestion>();
for (int i = 0; i < ar.size(); ++i)
enquetes.add(new EnqueteQuestion(ar.get(i)));
}
}
if (json.has("createdAt"))
this.createdAt = new DateTime(json.get("createdAt").asLong());