// Deserialize the data.
Map<ParamsProperty, Object> properties = new HashMap<ParamsProperty, Object>();
JsonElement data = jsonObject.get(ResponseProperty.DATA.key());
if (data != null && data.isJsonObject()) {
for (Entry<String, JsonElement> parameter : data.getAsJsonObject().entrySet()) {
ParamsProperty parameterType = ParamsProperty.fromKey(parameter.getKey());
if (parameterType == null) {
// Skip this unknown parameter.
continue;
}
Object object = null;
if (parameterType == ParamsProperty.BLIPS) {
object = context.deserialize(parameter.getValue(), GsonFactory.BLIP_MAP_TYPE);
} else if (parameterType == ParamsProperty.PARTICIPANTS_ADDED ||
parameterType == ParamsProperty.PARTICIPANTS_REMOVED) {
object = context.deserialize(parameter.getValue(), GsonFactory.PARTICIPANT_LIST_TYPE);
} else if (parameterType == ParamsProperty.THREADS) {
object = context.deserialize(parameter.getValue(), GsonFactory.THREAD_MAP_TYPE);
} else if (parameterType == ParamsProperty.WAVELET_IDS) {
object = context.deserialize(parameter.getValue(), GsonFactory.WAVELET_ID_LIST_TYPE);
} else if (parameterType == ParamsProperty.RAW_DELTAS) {
object = context.deserialize(parameter.getValue(), GsonFactory.RAW_DELTAS_TYPE);
} else {
object = context.deserialize(parameter.getValue(), parameterType.clazz());
}
properties.put(parameterType, object);
}
}