title: How to send JSON data as Body using Retrofit android
body: <p>I am trying to post below JSON array on server.</p>
  
  <pre><code>{
      "order": [{
              "orderid": "39",
              "dishid": "54",
              "quantity": "4",
              "userid":"2"
          },{
              "orderid": "39",
              "dishid": "54",
              "quantity": "4",
              "userid":"2"
          }]
  
  }
  </code></pre>
  
  <p>I am using this below :</p>
  
  <pre><code>private void updateOreder() {
  
      M.showLoadingDialog(GetDishies.this);
      UpdateAPI mCommentsAPI = APIService.createService(UpdateAPI.class);
  
      mCommentsAPI.updateorder(jsonObject, new Callback&lt;String&gt;() {
          @Override
          public void success(String s, Response response) {
              M.hideLoadingDialog();
              Log.e("ssss",s.toString());
              Log.e("ssss", response.getReason());
          }
  
          @Override
          public void failure(RetrofitError error) {
              M.hideLoadingDialog();
              Log.e("error",error.toString());
          }
  
      });
  
  }
  </code></pre>
  
  <p>I am getting below error:</p>
  
  <pre><code> retrofit.RetrofitError: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 6 path $
  </code></pre>
  
  <p>updateApi Code:</p>
  
  <pre><code>@POST("updateorder.php")
      void updateorder(@Body JSONObject object,Callback&lt;String&gt;());
  </code></pre>
  
  <p>Can any one please tell me my mistake?</p>
  
  <p>Thanks in advance</p>