title: How to parse JSON boolean value?
body: <p>I have a JSON object</p>
  
  <pre><code>JSONObject jsonObject = new JSONObject();
  </code></pre>
  
  <p>I'm able to populate the object successfully but, when I try to parse a <code>boolean</code> JSON value I get an error:</p>
  
  <blockquote>
    <p>08-28 15:06:15.809: E/Buffer Error(31857): Error converting result
    java.lang.ClassCastException: java.lang.Integer cannot be cast to
    java.lang.Boolean</p>
  </blockquote>
  
  <p>I do it like this:</p>
  
  <pre><code>boolean multipleContacts = (Boolean) jsonObject.get("MultipleContacts");
  </code></pre>
  
  <p>My JSON object graph is very simple, the boolean is stored in my database as BIT field (0 or 1)</p>
  
  <p>How do I solve this ?</p>
  
  <p>Here is my JSON:</p>
  
  <pre><code>{
      "ACCOUNT_EXIST": 1,
      "MultipleContacts": 0
  }
  </code></pre>