Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. this.username = (String)cursor.curr().get("username");
  2. String user_info = this.get_user();
  3. JSONParser parser = new org.json.simple.parser.JSONParser();
  4. System.out.println(user_info);
  5. JSONObject user_obj = (JSONObject) parser.parse(user_info);
  6. if (user_obj.get("Location") instanceof JSONObject) {
  7. JSONObject Loc = (JSONObject)user_obj.get("Location");
  8. temp_user.put("Location",Loc.get("__text"));
  9. }
  10. else{
  11. temp_user.put("Location",user_obj.get("Location"));
  12. }
  13. // temp_user.put("Location", cursor.curr().get("Location"));
  14. temp_user.put("Country", cursor.curr().get("Country"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement