5
I have the following string:
string tt= "{\"Response\":{\"StatusCode\":200,\"StatusMessage\":\"OK\",\"Content\":{\"family\":{\"codigo\":14,\"descricao\":\"Cal\\u00e7a\",\"frontoffice\":1,\"posicaofront\":31,\"posicaoprint\":26,\"fundo\":\"#c0c0c0\",\"letra\":\"#000000\",\"tipo\":0,\"loja\":14,\"subfamilies\":[{\"codigo\":60005,\"descricao\":\"Ganga\",\"familia\":14,\"fundo\":\"#c0c0c0\",\"letra\":\"#000000\",\"posicao\":0,\"loja\":\"14\",\"lastupdate\":\"2015-12-04 16:51:26\"}],\"lastupdate\":\"\",\"famzonas\":[{\"loja\":14,\"familia\":14,\"zona\":0}]}}}}";
And how much I try to give Replace()
in the " u00e7" to string looks the same:
tt.Replace("\u00e7", "c");
After executing this command the output remains the same:
{"Response":{"StatusCode":200,"StatusMessage":"OK","Content":{"family":{"codigo":14,"descricao":"Cal\u00e7a","frontoffice":1,"posicaofront":31,"posicaoprint":26,"fundo":"#c0c0c0","letra":"#000000","tipo":0,"loja":14,"subfamilies":[{"codigo":60005,"descricao":"Ganga","familia":14,"fundo":"#c0c0c0","letra":"#000000","posicao":0,"loja":"14","lastupdate":"2015-12-04 16:51:26"}],"lastupdate":"","famzonas":[{"loja":14,"familia":14,"zona":0}]}}}}
How do I change the " u00e7" to the "c" character"?
I understood what I was doing wrong, about the second problem before I saw your Dit I had put the code in the following way and it worked <code>tt = tt. Replace(" u00e7", "c"); </code>
– Medium
@Strange medium, not supposed to work no, see: https://dotnetfiddle.net/Q8rvS5
– Maniero
the code I had commented on was poorly edited and that’s how it worked using the " " before the "u00e7"
– Medium
@Medium true, I had not attacked me that you used the
\\
which also solves.– Maniero