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\",
Well, if you do have the string before hand, you can simply do
JSONObject object = JSONObject.getJSONObject("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\":{\"media\":\"music\"}, \"id\": 1}");