The following method sends a JSON reply. However on the receiving end I keep getting invalid characters, and UTF-8 isn\'t decoding the data. What am I doing wrong?
The first solution didn't work for me, I did this:
Gson gson = new GsonBuilder().disableHtmlEscaping().create(); String json = gson.toJson(objectToEncode);