title: JSON object not mapping to Java object with Gson
body: <p>This is my JSON  object from server:</p>
  
  <pre><code>"driverInfo": {
    "rideTime": null,
    "rideId": 1105,
    "driverProfile": {
      "userId": 9,
      "firstname": "nawaraj",
      "lastname": "shrestha",
      "phone": "9841444444",
      "email": null,
      "location": {
        "lat": 27.7131382,
        "lng": 85.3255354
      },
      "vehicleType": "Taxi",
      "vehicleNo": "4556",
      "rating": 3.3,
      "imageName": "NAbin25",
      "driverId": 4
    },
    "destinationLocation": null,
    "myLocation": {
      "lat": 27.7131382,
      "lng": 85.3255354
    },
    "otpCode": "7857",
    "trackRideUrl": null,
    "customerId": 1
  }
  </code></pre>
  
  <p>And this is my java class</p>
  
  <pre class="lang-java prettyprint-override"><code>public class RideDetails implements Serializable{
  @Nullable
  private String rideTime;
  private Integer rideId;
  private DriverProfile driverProfile;
  @Nullable
  private LatLng destinationLocation;
  @Nullable
  private LatLng myLocation;
  private String otpCode;
  private String trackRideUrl;
  private Integer customerId;
  
  public Integer getRideId() {
      return rideId;
  }
  
  public Integer getCustomerId() {
      return customerId;
  }
  
  public void setCustomerId(Integer customerId) {
      this.customerId = customerId;
  }
  
  public void setRideId(Integer rideId) {
      this.rideId = rideId;
  }
  
  public DriverProfile getDriverProfile() {
      return driverProfile;
  }
  
  public void setDriverProfile(DriverProfile driverProfile) {
      this.driverProfile = driverProfile;
  }
  
  @Nullable
  public LatLng getDestinationLocation() {
      return destinationLocation;
  }
  
  public void setDestinationLocation(@Nullable LatLng destinationLocation) {
      this.destinationLocation = destinationLocation;
  }
  
  @Nullable
  public LatLng getMyLocation() {
      return myLocation;
  }
  
  public void setMyLocation(@Nullable LatLng myLocation) {
      this.myLocation = myLocation;
  }
  
  @Nullable
  public String getRideTime() {
      return rideTime;
  }
  
  public void setRideTime(@Nullable String rideTime) {
      this.rideTime = rideTime;
  }
  
  public String getOtpCode() {
      return otpCode;
  }
  
  public void setOtpCode(String otpCode) {
      this.otpCode = otpCode;
  }
  
  public String getTrackRideUrl() {
      return trackRideUrl;
  }
  
  public void setTrackRideUrl(String trackRideUrl) {
      this.trackRideUrl = trackRideUrl;
  }
  }
  </code></pre>
  
  <p>To map the object .. I used Gson like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>Gson gson = new Gson();
  RideDetails rideDetails = gson.fromJson(jsonObject.toString(),RideDetails.class);
  </code></pre>
  
  <p>Everything details of JSON object maps to Java class fine except the <code>LatLng</code>.
  Though <code>LatLng</code> has a value in JSON object from server. All three <code>LatLng</code>: <code>location</code>, <code>destinationLocation</code> and <code>myLocation</code> have value <code>{lat:0.0,lng:0.0}</code> after mapping. What might be the problem?</p>