private static class EventJsonSerializer implements JsonSerializer<Event> {
@Override
public JsonElement serialize(Event event, Type type, JsonSerializationContext jsonSerializationContext) {
final JsonObject jsonObject = new JsonObject();
event.enumerate(new KeyValueCallback() {
@Override
public void callback(String key, String value) {
jsonObject.addProperty(key, value);
}
});