title: How to Parse below data in result using Gson in spring
body: <p>i am trying to get data from a server and store the response in result below </p>
  
  <pre><code>ResponseEntity&lt;String&gt; result = restTemplate.exchange("https://jira.example.com/rest/api/id",  HttpMethod.GET, new HttpEntity&lt;String&gt;(createHeaders()), String.class);
  
      result = &lt;200 OK,{
          "ipinfo": {
              "ip_address": "131.208.128.15",
              "ip_type": "Mapped",
              "Location": {
                  "continent": "north america",
                  "latitude": 30.1,
                  "longitude": -81.714,
                  "CountryData": {
                      "country": "united states",
                      "country_code": "us"
                  },
                  "region": "southeast",
                  "StateData": {
                      "state": "florida",
                      "state_code": "fl"
                  },
                  "CityData": {
                      "city": "fleming island",
                      "postal_code": "32003",
                      "time_zone": -5
                  }
              }
          }
      }&gt;
  </code></pre>
  
  <p>i have tried this  but asking me to change type of result to string but if i change i will get error at <code>resttemplateexchange();</code></p>
  
  <pre><code>  JsonElement jelement = new JsonParser().parse(result);
          JsonObject  jobject = jelement.getAsJsonObject();
          jobject = jobject.getAsJsonObject("ipinfo");
  </code></pre>