I am using Gson.toJSON method. My pojo contains one of attribute as URL string.
Strange thing is Gson converter changes URL characters
output is:
/myApp/myAction.html?method\u003drouter\u0026cmd\u003d1
expected output is:
/myApp/myAction.html?method=router&cmd=1
Create your Gson instance like this:
Disabling HTML escaping will prevent GSON from encoding the space character as \u0026.