title: Creating a jsonObject that contains another jsonObject
body: <p>I am using asynchttpclient to do a POST and am constructing a body like this:</p>
  
  <pre><code>{
    "params": {
                    "firstname": "%Paul%"
              }
  }
  </code></pre>
  
  <p>The following sometimes produces the right body, sometimes produces an empty body:</p>
  
  <pre><code> String encodedFirstname = "%" + first + "%";
   JSONObject paramsVal = new JSONObject();
   paramsVal.put("firstname", encodedFirstname);
   String[] keys = { "params" };
   JSONObject postBody = new JSONObject(paramsVal, keys);
  </code></pre>
  
  <p>What do I need to correct?  Thank you.</p>