title: JSONObject exceptions
body: <p>I am using a JSON array to process data back n forth between layers. I have been getting an exception on JSONObject. Could you please guide me towards the correct debug path for this issue? <br/>
  <strong>First approach:</strong></p>
  
  <pre><code>for( Object obj : salesDataArray )
  {
   JSONObject salesData = (JSONObject) obj;
  </code></pre>
  
  <p>Exception I am getting:<br/></p>
  
  <pre><code>java.lang.ClassCastException: java.lang.String incompatible with net.sf.json.JSONObject
  </code></pre>
  
  <p><strong>Second approach:</strong></p>
  
  <pre><code>for( Object obj : salesDataArray )
  {
  JSONObject salesData = JSONObject.fromObject(obj);
  </code></pre>
  
  <p>Exception I am getting:<br/></p>
  
  <pre><code>net.sf.json.JSONException: Unquotted string 'undefined'
  </code></pre>