Created
November 29, 2017 11:49
-
-
Save engr-erum/9d88f36b8acbddae96ca8305d6f0c364 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 static FailureResponse getErrorMessage(String responseString) { | |
Log.d(Utils.class.getName(),"responseString:"+responseString); | |
JsonParser parser = new JsonParser(); | |
JsonElement mJson = null; | |
mJson = parser.parse(responseString); | |
Gson gson = new Gson(); | |
FailureResponse failureResponse = gson.fromJson(mJson, FailureResponse.class); | |
return failureResponse; | |
} | |
public class FailureResponse { | |
private String[] non_errors; | |
public String[] getNon_errors() { | |
return non_errors; | |
} | |
public void setNon_errors(String[] non_errors) { | |
this.non_errors = non_errors; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment