code: public User parseResponse(JSONObject response) throws JSONException {
          GsonBuilder gsonBuilder = new GsonBuilder();
          gsonBuilder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
  
              @Override
              public Date deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
                  try {
                      SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                      return format.parse(jsonElement.getAsString());
                  } catch (ParseException e) {
                      return null;
                  }
              }
          });
          Gson gson = gsonBuilder.setDateFormat("yyyy-MM-dd HH:mm:ss").create();
          User user = gson.fromJson(String.valueOf(response.get("data")), User.class);
          user = parseArray(user, response.getJSONObject("data"));
          return user;
      }
docs: Parses user details response from server.
  @param response is the json response from server.
  @throws JSONException is thrown when there is error while parsing response.
  @return User is the parsed data.