org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject

Update:

Based on the HTML response, I can tell you that this is not JSON. The response tells me that you have the incorrect URL for your web service.

You need to check your URL.

Extra Info / Previous Answer:

It looks like the simple answer is the right one - your result is not a valid JSON string. See JSON.org website for details on what JSON should look like.

Check out JSON Parser Online - I find its very useful when working with JSON.

It is strange that you are requesting JSON, and it is not returning it properly - perhaps I have missed something.


Yes, we get such kind of warning when the given URL is not valid.

Just check the URL once.