title: Parse json to java object: Expected BEGIN_OBJECT but was BEGIN_ARRAY
body: <p>Can someone help me with parsing json string to object, I´m trying but always get error like this:</p>
  <pre><code>Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 3 path $[0]
  </code></pre>
  <p>Here is my code:</p>
  <p>Item class:</p>
  <pre><code>@JsonInclude(JsonInclude.Include.NON_NULL)
  public class Item{
  
      @JsonProperty(&quot;id&quot;)
      String id;
      
      @JsonProperty(&quot;dTime&quot;)
      long dTime;
      
      @JsonProperty(&quot;aTime&quot;)
      long aTime;
  }
  </code></pre>
  <p>converting json to object:</p>
  <pre><code>String jsonString = &quot;[
      [
          {
              &quot;id&quot;:&quot;string&quot;,
              &quot;dTime&quot;: 1111111111,
              &quot;aTime&quot;: 1111111111
          },
          {
              &quot;id&quot;:&quot;string&quot;,
              &quot;dTime&quot;: 1111111111,
              &quot;aTime&quot;: 1111111111
          }
      ]
  ]&quot;;
  Gson gson = new Gson();
  Type listType = new TypeToken&lt;List&lt;Item&gt;&gt;() {}.getType();
  List&lt;Item&gt; list = gson.fromJson(jsonString, listType);
  
  System.out.println(gson.toJson(list));
  </code></pre>
  <p><strong>Update:</strong>
  Because i get this json as response from external API:</p>
  <pre><code>ResponseEntity&lt;String&gt; response = restTemplate.exchange(url, HttpMethod.POST, request, String.class);
  </code></pre>
  <p>Is it possible to make this converting to Array of Item objects inside this restTemplate.exchange(..) or this with gson is better way?</p>