Package weibo4j.org.json

Examples of weibo4j.org.json.JSONArray


    /*package*/ SavedSearch(JSONObject savedSearch) throws WeiboException {
        init(savedSearch);
    }

    /*package*/ static List<SavedSearch> constructSavedSearches(Response res) throws WeiboException {
            JSONArray json = res.asJSONArray();
            List<SavedSearch> savedSearches;
            try {
                savedSearches = new ArrayList<SavedSearch>(json.length());
                for(int i=0;i<json.length();i++){
                    savedSearches.add(new SavedSearch(res,json.getJSONObject(i)));
                }
                return savedSearches;
            } catch (JSONException jsone) {
                throw new WeiboException(jsone.getMessage() + ":" + res.asString(), jsone);
            }
View Full Code Here


        try {
          previousCursor = json.getLong("previous_cursor");
            nextCursor = json.getLong("next_cursor");
         
            if(!json.isNull("ids")){
            JSONArray jsona= json.getJSONArray("ids");
            int size=jsona.length();
            ids =new int[ size];
            for (int i = 0; i < size; i++) {
              ids[i] =jsona.getInt(i);
        }
          }
         
         } catch (JSONException jsone) {
             throw new WeiboException(jsone);
View Full Code Here

    tm.setToken(access_token);
    try {
//      JSONObject ids = tm.getUserTimelineIdsByUid(args[1]);
      JSONObject ids = tm.getUserTimelineIdsByUid("1450317544");
      Log.logInfo(ids.toString());
      JSONArray array = (JSONArray) ids.get("statuses");

      ArrayList<String> list = new ArrayList<String>();
      for (int i = 0; i < array.length(); ++i) {
        list.add(array.get(i).toString());
      }

      System.out.println(list.size());

      StatusWapper wrapper = tm.getUserTimelineByUid("1450317544", new Paging(1), 0, 0);
View Full Code Here

    tm.setToken(access_token);
    try {
//      JSONObject ids = tm.getUserTimelineIdsByUid(args[1]);
      JSONObject ids = tm.getUserTimelineIdsByUid("1450317544");
      Log.logInfo(ids.toString());
      JSONArray array = (JSONArray) ids.get("statuses");

      ArrayList<String> list = new ArrayList<String>();
      for (int i = 0; i < array.length(); ++i) {
        list.add(array.get(i).toString());
      }

      System.out.println(list.size());

      StatusWapper wrapper = tm.getUserTimelineByUid("1450317544", new Paging(1), 0, 0);
View Full Code Here

TOP

Related Classes of weibo4j.org.json.JSONArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.