use of com.willshex.gson.web.service.shared.Error in project blogwt by billy1380.
the class Response method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("status")) {
JsonElement jsonStatus = jsonObject.get("status");
if (jsonStatus != null) {
status = StatusType.fromString(jsonStatus.getAsString());
}
}
if (jsonObject.has("error")) {
JsonElement jsonError = jsonObject.get("error");
if (jsonError != null) {
error = new Error();
error.fromJson(jsonError.getAsJsonObject());
}
}
if (jsonObject.has("session")) {
JsonElement jsonSession = jsonObject.get("session");
if (jsonSession != null) {
session = new Session();
session.fromJson(jsonSession.getAsJsonObject());
}
}
}
Aggregations