orhanobut / hawk

✔️ Secure, simple key-value storage for Android
Apache License 2.0
3.98k stars 388 forks source link

some data are not supported #221

Open tdxtxt opened 6 years ago

tdxtxt commented 6 years ago
public class ResponseBody<T>{
    public String status;
    public T data;
    public String msg;
}
public class Test {
    public static void main(String[] args){
        Hawk.init(DevApp.getContext()).build();

        ResponseBody<List<String>> body = new ResponseBody<>();
        body.data = Arrays.asList("1","2","3");
        body.status = "status";
        body.msg = "msg";
        Hawk.put("body",body);

        ResponseBody<List<String>> newBody = Hawk.get("body");

       //newBody.data------Data types are mistaken,is LinkedTreeMap
       //How to solve?
    }
}
lisonge commented 5 years ago

some as me, i think it just save some group class of int string btye boolean short ect...