event.addProperty("id", e.getID());
event.addProperty("time", format.format(new Date(e.getTime())));
event.addProperty("type", toAuditEventType(e.getType()));
JsonObject eventProperties = new JsonObject();
Dictionary p = e.getProperties();
Enumeration keyEnumeration = p.keys();
while (keyEnumeration.hasMoreElements()) {
Object key = keyEnumeration.nextElement();
eventProperties.addProperty(key.toString(), p.get(key).toString());
}
event.add("properties", eventProperties);