title: How to convert a JSON object (returns from google places API) to a Java object
body: <p>Google places API returns a JSON when it requested for a place under food category which includes the details of several places.</p>
  
  <p>I want to create an object array where each object contains details of a specific place.</p>
  
  <p>I have used GSON library for my implementation and it works fine for a dummy JSON object but not with the JSON result given from Google place API and 'JsonSyntaxException' is thrown.</p>
  
  <p>I look for a solution for following matters..
  1 How can I proceed with GSON and given JSON object to create my object array or
  2 Is there any other way to accomplish my task (still using JSON result)</p>
  
  <p>Thanks.  </p>
  
  <p><strong>update</strong><br>
  <strong>Class PlaceObject</strong> </p>
  
  <pre><code>import java.util.List;
  
  public class PlaceObject {
      private List&lt;String&gt; results;
  } 
  </code></pre>
  
  <p><strong>Class JSONconverter</strong></p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.FileReader;
  import java.io.IOException;
  import com.google.gson.Gson;
  
  public class JSONconverter {
      public static void main(String[] args) {
  
  Gson gson = new Gson();
  
  try {
  
      BufferedReader br = new BufferedReader(
          new FileReader("c:\\placeAPI.json"));
  
      //convert the json string back to object
      PlaceObject obj = gson.fromJson(br, PlaceObject.class);
      //obj.results = null ,when debugged thats the problem
      System.out.println("Result: " + obj);
  
      } catch (IOException e) {
      e.printStackTrace();
      }
  
      }
  }
  </code></pre>
  
  <p><strong>The link of JSON</strong></p>
  
  <p><a href="http://www.mediafire.com/?8mmnuxuopimhdnz" rel="nofollow">http://www.mediafire.com/?8mmnuxuopimhdnz</a></p>