title: How can I delete the nameValuePairs key from the JSONObject?
body: <p>I'm working on an Android project which needs a JSONObject for the body of my POST request.
  After putting the keys and values of the JSON I got the following line:</p>
  
  <pre><code>{
      "xxxx":"zzzzzzz",
      "yyyy":"uuuuuuu"
  }
  </code></pre>
  
  <p>But the server got the following:</p>
  
  <pre><code>{
      "name_value_pairs": {
                          "xxxx":"zzzzzzz",
                          "yyyy":"uuuuuuu"
      }
  }
  </code></pre>
  
  <p>I've already tried a JSONStringer but it wasn't really helpful because the <code>Content-Type</code> of the request is <code>application/json</code>.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I'm not trying to construct a JSONObject because it's already done by using the following line of code (the same given by @osayilgan):</p>
  
  <pre><code>JSONObject jsonRequest = new JSONObject();
  jsonRequest.put("xxxx", "zzzzzzz");
  jsonRequest.put("yyyy", "uuuuuuu");
  </code></pre>
  
  <p>Here is not the problem. The interface described below is used to communicate with the server.</p>
  
  <pre><code>public interface MyService {
      @Headers({"Content-type: application/json",
                "Accept: */*"})
      @POST("/test")
      void testFunction(@Body JSONObject jsonObject, Callback&lt;Response&gt; callback);
  }
  </code></pre>
  
  <p>The server got the request with the second JSON as Body which is disappointing. I note that the key <code>name_value_pairs</code> is automatically added to the object.</p>
  
  <p>Does anybody know how can I fix this?</p>