使用Flexjson将JSON反序列化为ArrayList(Java Android)

时间:2014-08-13 20:35:56

标签: java android json serialization flexjson

我想将这个json数据反序列化为ArrayList

{"users":[{"username":"jon@jafprod.com","pw":"123456","data":""},{"username":"fred@jones.com","pw":"abcde","data":""}]}

这是班级

public class UserClass
{
    public String email;
    public String pw;
    public JSONObject data;
}

我的尝试如:

UserClass users = new JSONDeserializer<UserClass>().use("users", UserClass.class)
                    .deserialize( resultStr, Array.class );

但总是会导致java.lang.NoClassDefFoundError:解析失败:Lflexjson / JSONDeserializer;

0 个答案:

没有答案