
com.pusher.client.channel.PusherEventDeserializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pusher-java-client Show documentation
Show all versions of pusher-java-client Show documentation
This is a Java client library for Pusher, targeted at core Java and Android.
package com.pusher.client.channel;
import java.lang.reflect.Type;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
public class PusherEventDeserializer implements JsonDeserializer {
private final Gson GSON = new Gson();
@Override
@SuppressWarnings("unchecked")
public PusherEvent deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
return new PusherEvent(GSON.fromJson(json, Map.class));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy