title: Send POST request of Json Array as data to server using volley
body: <p>I want to send a post request using volley. I have data in this format.</p>
  
  <pre><code>  [{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"10:29:17","id":1},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"15:59:41","id":2},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:05:53","id":3},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:06:16","id":4},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:06:51","id":5},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:08:36","id":6},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:13:33","id":7},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"16:22:32","id":8},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"17:00:46","id":9},{"date":"24 Jul 2015","doctorEmail":"mohd.aquib09@gmail.com","doctorName":"aquib","time":"17:04:04","id":10}]
  </code></pre>
  
  <p>And I am getting response in this format</p>
  
  <pre><code>{"Message" : "Success"}
  </code></pre>
  
  <p>I have written this code to send request.</p>
  
  <pre><code>   public void saveDataToServer(String data){
  
          final String BASE_URL = "http://spirantcommunication.com/andriod/grl/doctor_visit_track1.php";
          final String DOCTOR_JSON_PARAM = "doctorJson";
  
          HashMap&lt;String, String&gt; params = new HashMap&lt;&gt;();
          params.put(DOCTOR_JSON_PARAM, data);
  
          JsonObjectRequest request = new JsonObjectRequest(BASE_URL, new JSONObject(params),
  
                  new Response.Listener&lt;JSONObject&gt;() {
                      @Override
                      public void onResponse(JSONObject response) {
                          try{
                              VolleyLog.v("Response:%n %s", response.toString(4));
                          }catch (JSONException e){
                              e.printStackTrace();
                          }
                      }
                  }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
  
              }
          });
  
          MySingleton.getInstance(this).addToRequestQueue(request);
      }
  </code></pre>
  
  <p>But I am not able to send it.Please somebody help me.</p>