/GenericResponse.java Secret
Last active
September 7, 2016 03:47
this json is being used in http://www.myblogspro.com/blog/jeetmp3/2016/8/20/JSON-deserialize-generic-types-using-Gson-and-Jackson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GenericResponse<T> { | |
private boolean status; | |
private int code; | |
private T data; | |
public boolean isStatus() { | |
return status; | |
} | |
public void setStatus(boolean status) { | |
this.status = status; | |
} | |
public int getCode() { | |
return code; | |
} | |
public void setCode(int code) { | |
this.code = code; | |
} | |
public T getData() { | |
return data; | |
} | |
public void setData(T data) { | |
this.data = data; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserResponse { | |
private String name; | |
private String email; | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public String getEmail() { | |
return email; | |
} | |
public void setEmail(String email) { | |
this.email = email; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment