Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(cursor.hasNext()) {
- System.out.println(cursor.next());
- JSONObject temp_user = new JSONObject();
- temp_user.put("username", cursor.curr().get("username"));
- temp_user.put("verified", cursor.curr().get("verified"));
- temp_user.put("first_name", cursor.curr().get("first_name"));
- temp_user.put("surname", cursor.curr().get("surname"));
- this.username = (String)cursor.curr().get("username");
- String user_info = this.get_user();
- JSONParser parser = new org.json.simple.parser.JSONParser();
- System.out.println(user_info);
- JSONObject user_obj = (JSONObject) parser.parse(user_info);
- if (user_obj.get("Location") instanceof JSONObject) {
- JSONObject Loc = (JSONObject)user_obj.get("Location");
- temp_user.put("Location",Loc.get("__text"));
- }
- else{
- temp_user.put("Location",user_obj.get("Location"));
- }
- // temp_user.put("Location", cursor.curr().get("Location"));
- temp_user.put("Country", cursor.curr().get("Country"));
- array.add(temp_user);
- count++;
- if (count == n) { break; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement