Search code examples
phpandroidjsongetstring

Is there anything like JSONObject.getString() to get !DOCTYPE method


I am POSTing to a PHP file from my website. I am not using JSON, so when I try to use code like Log.e("errr", jsonObj.getString("err")); I get a system.err saying:

07-27 20:57:29.274: W/System.err(2431): org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject

Is there a method like JSONObject that I can use to parse/get the given string that I want to get?


Solution

  • It was easier just to restructure my php so that I could call json.