I am working with restful webservice and I get json from it like the following
response = [{"id":1,"name":"Appetizers","image":"iVBORw0KGgoAAAANSUhEUgAAADgAAAAkCAIAAABT8G6pAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABb5SURBVFhHPVgHUFPrtmbevTPvvnPvO8eKKJ1ASAikEEIaSYBAEkroSLWBHex67A3FBhYsWEFUBBuCDRRRpCMlhPS+0zs1gHD0HN72vjfvnzV/dpI9s7 ....
after that I want to convert this json to JSONObject
JSONObject obj = new JSONObject(response);
and when I execute this command I get the follwoing error
org.json.JSONException: Value [{"resturantID":{"phoneNo":"a","id":1,"fax":"a","address":"a" ...
my program was working good when I was using glassfish 3 because the json structure was different from this what is the problem ?