已有model
public class CustomerBean<T>{
private T data;
private other;
//...
//setter...getter...
}
Jackson
CustomerBean<String> info = om.readValue(message, new TypeReference<CustomerBean<String>>() {});
Gson
CustomerBean<String> billWebsocketInfo = gson.fromJson(message, new TypeToken<CustomerBean<String>>() {}.getType());
help yourself