Hi I am trying to send a JSON object to the server. The JSON object is :
JSONObject j = new JSONObject("{'Hobbies':" + h + "}");
{"Hobbies" : "Programming & Gaming"}
But as I SEND this object via HTTP it gives me an error Unterminated Object at character 22. After a lot of research I found out the '&' splits the object. Is there anyway I can escape '&'. I tried '\&' but it doesn't work as there is no escape sequence like that.