Errors When Getting Json Result Into Listview
Solution 1:
The error message Value <!DOCTYPE> of type java.lang.String cannot be converted to JSONObject
indicates that you're not getting a JSON response from the server, but a markup document, most probably an error page.
You can either try executing the request outside Android to check whether it's working fine, or you can split your process into two steps:
- Get a text response from the web service into String, and
Log
it. - Parse that String into JSON
That way you will have a log of the response before the parsing fails, so you will have more info.
Solution 2:
Thanks to everyone for your responses
I found the mistake
Actually It's just an error passing a wrong parameter
in fact it's a mistake in the web server that there are should be 2 kind of access token one for Login and the other for the selected event But when I select an event the implementation change the one that comes with login to event access token
previously I was working on specific Event ID without to finish other things related to events that's why I didn't notice the changes
Now Problem Solved
Long story short The Code Is Correct
thank you again
Post a Comment for "Errors When Getting Json Result Into Listview"