Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.68 KB | None | 0 0
  1. -----------------------------------com.example.Example.java-----------------------------------
  2.  
  3. package com.example;
  4.  
  5. import java.util.List;
  6. import com.google.gson.annotations.Expose;
  7. import com.google.gson.annotations.SerializedName;
  8.  
  9. public class Example {
  10.  
  11.     @SerializedName("result")
  12.     @Expose
  13.     private List<Result> result = null;
  14.  
  15.     public List<Result> getResult() {
  16.     return result;
  17.     }
  18.  
  19.     public void setResult(List<Result> result) {
  20.     this.result = result;
  21.     }
  22.  
  23. }
  24. -----------------------------------com.example.Result.java-----------------------------------
  25.  
  26. package com.example;
  27.  
  28. import com.google.gson.annotations.Expose;
  29. import com.google.gson.annotations.SerializedName;
  30.  
  31. public class Result {
  32.  
  33. @SerializedName("Users")
  34. @Expose
  35. private Users users;
  36.  
  37. public Users getUsers() {
  38. return users;
  39. }
  40.  
  41. public void setUsers(Users users) {
  42. this.users = users;
  43. }
  44.  
  45. }
  46. -----------------------------------com.example.Users.java-----------------------------------
  47.  
  48. package com.example;
  49.  
  50. import com.google.gson.annotations.Expose;
  51. import com.google.gson.annotations.SerializedName;
  52.  
  53. public class Users {
  54.  
  55. @SerializedName("id")
  56. @Expose
  57. private String id;
  58. @SerializedName("user_name")
  59. @Expose
  60. private String userName;
  61. @SerializedName("user_password")
  62. @Expose
  63. private String userPassword;
  64.  
  65. public String getId() {
  66. return id;
  67. }
  68.  
  69. public void setId(String id) {
  70. this.id = id;
  71. }
  72.  
  73. public String getUserName() {
  74. return userName;
  75. }
  76.  
  77. public void setUserName(String userName) {
  78. this.userName = userName;
  79. }
  80.  
  81. public String getUserPassword() {
  82. return userPassword;
  83. }
  84.  
  85. public void setUserPassword(String userPassword) {
  86. this.userPassword = userPassword;
  87. }
  88.  
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement