I\'m trying to encode this string for a POST request. Can anyone tell me how I can encode
POST
{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\",
JSONOjbect obj = new JSONObject().put("jsonrpc", "2.0") .put("method", "Files.GetSources").put("id", 1) .put("params", new JSONObject().put("media", "music"));
Chaining .put() like this is possible because put() returns the object it was called on - for this exact purpose.