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\",
You have two choices. You can create another object that holds "media":"music" and then put that in the original JSONObject or you can just pass this whole string into the JSONObject constructor and have it parse it for you.
"media":"music"
JSONObject