Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static FailureResponse getErrorMessage(String 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
You can’t perform that action at this time.