this.participations = participations;
this.numEvents = numEvents;
}
public ObjectNode toSafeJSON() {
ObjectNode obj = new ObjectNode(JsonNodeFactory.instance);
obj.put("numEvents", numEvents);
ArrayNode events = obj.putArray("participations");
for (EventParticipation participation : participations)
events.add(participation.toSafeJSON());
return obj;