JSON error with accents

Asked

Viewed 425 times

2

I’m having trouble with mine JSON, the error is accentuation, the JSON allows? if it allows, how can I show, what will receive the JSON needs him to be normal, with accents and everything..

MY JSON:

{
    "id": "addCTE",
    "status": "Em Digita\u00e7\u00e3o",
    "chaveDeAcesso": "000001",
    "versaoXML": "2.0",
    "modelo": "1",
    "serie": "2",
    "numero": "3",
    "dataHoraEmissao": "2015-08-12",
    "cfop": "4",
    "naturezaDaOperacao": "5",
    "modal": "aquaviario",
    "tipoServico": "subcontratacao",
    "finalidadeDeEmissao": "cte_normal",
    "formaDeEmissao": "contingencia_fsda",
    "formaDePagamento": "pago",
    "formatoDeImpressaoDoDACTE": "retrato",
    "chaveAcessoDoCteReferenciado": "5",
    "localDeEmissaoCTeUF": "SP",
    "localDeEmissaoCTeMunicipio": "S\u00e3o Paulo",
    "localDeInicioDaPrestacaoUF": "SC",
    "localDeInicioDaPrestacaoMunicipio": "Salete",
    "localTerminoDaPrestacaoUF": "RJ",
    "localTerminoDaPrestacaoMunicipio": "Rio de Janeiro",
    "caracteristicaAddDoTransporte": "",
    "caracteristicaAddDoServico": "",
    "funcionarioEmissor": "",
    "municipioDeOrigemParaCalculoFrete": "",
    "municipioDeDestinoParaCalculoFrete": "",
    "codigoDaRotaDeEntrega": "",
    "fluxoDeCargaOrigem": "",
    "fluxoDeCargaDestino": "",
    "previsao_data": "",
    "previsao_hora": "",
    "detalhesDadosRetirada": ""
}

In place of accents is the code, for example the word Digitação is exhibiting Digita\u00e7\u00e3o

1 answer

4


When you "disconnect" the JSON, you will choose a "charset", as it is, it is only "Unicode". I believe what you are using is Latin-1, or ISO-8859-1.

\u00e7 = ç

\u of Unicode, and 00e7 is the value of the character.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.