First, as Mark said, you have an extra curly bracket. You also have switched the ending square bracket with the ending curly bracket. The error might be indicating you are trying to access "Result" as a JSONObject, as opposed to the JSONArray that it is. Or it is a side effect of the mal-formed JSON.
On Nov 15, 5:37 am, Mark Murphy <[email protected]> wrote: > TJ wrote: > > I'm having a weird error, seems to be cause whenever I hit JSONObject > > json=new JSONObject(result);. > > The error msg is org.json.JSONException: A JSONObject text must begin > > with '{. I have no idea how to fix this is any one have any idea > > PLEASE LET ME KNOW. The JSON File is > > > thanks > > > The JSON File is > > {"ResultSet":{ > > "totalResultsAvailable":"3", > > "totalResultsReturned":"2", > > "firstResultPosition":"1", > > "Result":[ > > { > > "Title":"madonna 116", > > "Summary":"Picture 116 of 184", > > "Url":"http:\/\/www.celebritypicturesarchive.com\/pictures\/m\/ > > madonna\/madonna-116.jpg", > > } > > }, > > { > > "Title":"madonna 118", > > "Summary":"Picture 118 of 184", > > "Url":"http:\/\/www.celebritypicturesarchive.com\/pictures\/m\/ > > madonna\/madonna-118.jpg", > > } > > } > > ] > > } > > } > > I don't know about the text of the error, but that does not look like > valid JSON. You have a couple of extra closing braces, AFAICT. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, $35/Year -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

