阅读背景:

当试图从JSONArray中检索JSONObject时返回null?

来源:互联网 

Im trying to do the following:

我试着做以下事情:

UserFunctions uf = new UserFunctions();
    JSONArray json = uf.getAllFreebies();
    System.out.println(json + "blah1"); //Here im able to retrieve the whole JSONArray.

try{    
System.out.println("1");
    for (int i = 1; i <json.length(); i++) {
        System.out.println("2");
            jo = json.optJSONObject(i); //Im getting null value here
            System.out.println(jo + "blah2"); //Here im getting null
Us



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: