title: How to nest objects when building JSON with JSONObject
body: <p>I'm trying to encode this string for a <code>POST</code> request. Can anyone tell me how I can encode  </p>
  
  <pre><code>{"jsonrpc": "2.0", "method": "Files.GetSources", "params":{"media":"music"}, "id": 1}
  </code></pre>
  
  <p>So far I have</p>
  
  <pre><code>JSONOjbect obj = new JSONObject();
  obj.put("jsonrpc", "2.0");
  obj.put("method", "Files.GetSources");
  </code></pre>
  
  <p>But I'm not sure how to put in the rest - can anyone help?</p>