0

I'm converting simple POJO with a string inside with the following code:

Gson gson = new Gson();
String json = gson.toJson(pojo);

I'm getting this json string:

{"test": "to\u00c4\u008dno"}

"to\u00c4\u008dno" should be "to\u010dno" but instead it puts two hexadecimal utf8 characters which is wrong.

Something is wrong with encoding but can't figure out what.

dfilkovi
  • 3,001
  • 7
  • 37
  • 50

0 Answers0