title: How to convert json object into string in Android
body: <p>My JSON format is:</p>
  
  <pre><code>[
      {
          "change": 1.59,
          "name": "ABC",
          "price": 10.52,
          "volume": 230
      },
      {
          "change": -0.05,
          "name": "DEF",
          "price": 1.06,
          "volume": 1040
      },
      {
          "change": 0.01,
          "name": "GHI",
          "price": 37.17,
          "volume": 542
      }
  ]
  </code></pre>
  
  <p>I want to parse it and convert it into string. I am using this method for converting it:</p>
  
  <pre><code>JSONObject jsonObj = new JSONObject(jsonStr);
  for (int i = 0; i &lt; jsonObj.length(); i++)
  {                                              
      String change = jsonObj.getString(TAG_CHANGE);
      String name = jsonObj.getString(TAG_NAME);
      String price = jsonObj.getString(TAG_PRICE);
      String volume = jsonObj.getString(TAG_VOLUME);
      HashMap&lt;String, String&gt; contact = new HashMap&lt;String, String&gt;();
  
      // adding each child node to HashMap key =&gt; value
      contact.put(TAG_CHANGE, change);
      contact.put(TAG_NAME, name);
      contact.put(TAG_PRICE, price);
      contact.put(TAG_VOLUME, volume);
  
      // adding contact to contact list
      contactList.add(contact);
  }
  </code></pre>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>/System.err(867): at org.json.JSON.typeMismatch(JSON.java:111)</p>
  </blockquote>
  
  <p>How do I resolve this?</p>