I\'m new to JSON and REST. I\'m working with a server that returns strings like these:
[{\"username\":\"Hello\",\"email\":\"hello@email.com\",\"credits\":\"1         
        
I have used org.json.simple.JSONObject and org.json.simple.JSONArray, and I hope net.sf.json.JSONArray also work same.
You should put following string format for output (JSONArray array = new JSONArray(output); )
 {"YOUR_ARRAY_NAME": [{"username":"Hello","email":"hello@email.com","credits":"100","twitter_username":""},{"username":"Goodbye","email":"goodbye@email.com","credits":"0","twitter_username":""}]}
Now this is String representation of JSONArray.