title: Json Gson binding not working (Exception object / String)
body: <p>I'm having some trouble parsing a JSON that I obtain from my DB to my Java (Android) Application. I hope you can help me out:</p>
  
  <p>This is the Json that I have:</p>
  
  <pre><code>&lt;br&gt;
  [{&lt;br&gt;
    "ID" : "1",&lt;br&gt;
    "name" : "Test name",&lt;br&gt;
    "type" : "1",&lt;br&gt;
    "Desc" : "blablabla",&lt;br&gt;
    "minNum" : "0",&lt;br&gt;
    "maxNum" : "12",&lt;br&gt;
    "Num" : "8",&lt;br&gt;
    "bool1" : "0",&lt;br&gt;
    "bool2" : "1",&lt;br&gt;
    "bool3" : "1",&lt;br&gt;
    "date" : "2012-04-01 23:00:00",&lt;br&gt;
    "double1" : "39.47208",&lt;br&gt;
    "doubl2" : "-0.3556063",&lt;br&gt;
    "someText" : "ajayeah",&lt;br&gt;
    "number" : "15",&lt;br&gt;
    "anotherNumber" : "1234"&lt;br&gt;
  }, {"ID" : "2",&lt;br&gt;
    "name" : "Test name",&lt;br&gt;
    "type" : "1",&lt;br&gt;
    "Desc" : "blablabla",&lt;br&gt;
    "minNum" : "0",&lt;br&gt;
    "maxNum" : "12",&lt;br&gt;
    "Num" : "8",&lt;br&gt;
    "bool1" : "0",&lt;br&gt;
    "bool2" : "1",&lt;br&gt;
    "bool3" : "1",&lt;br&gt;
    "date" : "2012-04-01 23:00:00",&lt;br&gt;
    "double1" : "39.47208",&lt;br&gt;
    "doubl2" : "-0.3556063",&lt;br&gt;
    "someText" : "ajayeah",&lt;br&gt;
    "number" : "15",&lt;br&gt;
    "anotherNumber" : "1234"&lt;br&gt;
  }]&lt;br&gt;
  </code></pre>
  
  <p>(The names are ovbiously not the ones I wrote here :P)</p>
  
  <p>I have all that as a String (checked, OK), for example in a variable called responseString;</p>
  
  <p>and then I've tried all possible ways to do the conversion but it always fails. I've tried to get it as an Object removing '[' ']', as an Array (things I achieved but then this line fails):</p>
  
  <pre><code>MyClassList MyClas = new Gson().fromJson(responseString, MyClassList.class);
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>com.google.gson.JsonSyntaxException: 
  java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY 
  </code></pre>
  
  <p>(with other tests converting it first to object or array, the error is with BEGIN_STRING)</p>
  
  <p>Could it be because I'm using booleans, and Calendar type (in Date) and it's not supported by Gson library?</p>
  
  <p>Well, I hope you can get my out of here because I'm going mad.</p>
  
  <p>Thanks :)</p>
  
  <hr>
  
  <p>Don't use Calendar, that was my problem. Instead, you may use Date and it works. Also, I don't know why, booleans like "0"|"1" don't work. Like "true"|"false" yes.</p>