title: How can I POST a JSONObject using Volley and receive in a String?
body: <p>I'm trying to post an JSONObject using Volley. Most probably, the servers response is not type JSONObject. Any ideas or workaround?
  This is my code:</p>
  
  <pre><code> RequestQueue requestQueue = Volley.newRequestQueue(context);
  
      JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, jsonobject, new Response.Listener&lt;JSONObject&gt;() {
          @Override
          public void onResponse(JSONObject response) {
  
              Build.logError("Response:" + response);
  
          }
      }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError volleyError) {
              Build.logError("Error: " + volleyError);
  
  
          }
      });
  
      requestQueue.add(jsonObjectRequest);
  </code></pre>
  
  <p>and this is the error response I'm receiving :</p>
  
  <pre><code>com.android.volley.ParseError: org.json.JSONException: Value OK of type java.lang.String cannot be converted to JSONObject
  </code></pre>
  
  <p>Thank you in advance.</p>