Preconditions.checkNotNull(eventName);
Preconditions.checkNotNull(target);
Preconditions.checkNotNull(source);
Map<String, Object> map = new HashMap<String, Object>();
map.put("event", eventName);
map.put("target", new JSONObject(target));
map.put("source", new JSONObject(source));
if (targetObject != null) {
map.put("target_object", new JSONObject(targetObject));
}
return new JSONObject(map);
}