Note that there are some explanatory texts on larger screens.

plurals
  1. POJSON parsing problem
    primarykey
    data
    text
    <p>i am trying to Json parsing in my android app the link is <a href="https://www.buzzador.com/apps/present_software/webservice/index.php?op=ProductQ&amp;campaign_id=607&amp;userid=10776" rel="nofollow">https://www.buzzador.com/apps/present_software/webservice/index.php?op=ProductQ&amp;campaign_id=607&amp;userid=10776</a></p> <p>when i put it into Json object it gives errors to me error is : 08-31 14:40:52.281: WARN/System.err(416): org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject</p> <pre><code>public static String getmyproductquestiondetails(String userid, String campaignid) {// https://www.buzzador.com/apps/present_software/webservice/index.php?op=EducationResult&amp;userid=1&amp;questionid=1,2,3&amp;answergivenbyuser=1,1,0 String data = null; try { URL url = new URL( "http://dignizant.com/buzz/webservice/index.php?op=getProductQuestion&amp;userid=" + userid + "&amp;campaign_id=" + campaignid); if (url.getProtocol().toLowerCase().equals("https")) { trustAllHosts(); HttpsURLConnection https = (HttpsURLConnection) url .openConnection(); https.setHostnameVerifier(DO_NOT_VERIFY); http = https; } else { http = (HttpURLConnection) url.openConnection(); } } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Utils utils = new Utils(); try { data = utils.convertStreamToString(http.getInputStream()); System.out.println("getproduct details response :: " + data); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); data = e.toString(); } return data; } try { JSONObject jo = new JSONObject(response); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload