I have a ArrayList
and when I convert it to a Json
using Gson
the special characters do not match the serialization.
Obs My bank and project is in utf8
encoding.
I'm serializing ArrayList
like this:
Cliente cliente = new Cliente();
ClienteDAO dao = new ClienteDAO();
lista = dao.listaClientes(cliente,empresa,dataHoraExp,compartilhaBas);
Gson g = new Gson();
String json = g.toJson(lista);
In my%% change% where you should display json
is displaying "bairro1":"NOSSA SRº DE FATIMA"
.
How do I convert without losing the special characters?