io.relayr.java.model.json.JsonRequest Maven / Gradle / Ivy
package io.relayr.java.model.json;
import com.google.gson.Gson;
import java.io.Serializable;
public class JsonRequest implements Serializable {
private Object data;
public JsonRequest(T data) {
this.data = data;
}
public T getData(T type) {
if (data == null) return null;
return new Gson().fromJson(data.toString(), (Class) type);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy