In a Java app, i get JSON (from Google Maps) with characters like \x26
which i want to convert to its original character &
. As far as i can see, that's a UTF-8 notation, but i am not completely sure. In the source JSON all kinds of encoded characters can appear (e.g. \x3c/div\x3e
). How can i decode them?
I tried:
String json = "\\x3c/div\\x3e";
byte [] b = json.getBytes("UTF-8");
json = new String(b,"UTF-8");
No luck. Any ideas?