private static final String PROP_TYPE = "type";
private static final String PROP_PREVIOUS_VALUE = "previousValue";
private static final String PROP_NEW_VALUE = "newValue";
public JSONObject toJson(Object representation) {
JSONObject json = new JSONObject();
json.putOpt(PROP_ATTRIBUTE, ((Change)representation).getAttribute());
json.putOpt(PROP_TYPE, ((Change)representation).getType());
json.putOpt(PROP_PREVIOUS_VALUE, (getConversionService().toJson(((Change)representation).getPreviousValue())));
json.putOpt(PROP_NEW_VALUE, (getConversionService().toJson(((Change)representation).getNewValue())));
return json;
}