I implemented an app that gets data from a JSON. JSON is returning me characters:
Âé...
How I can get that return JSON:
áéíóú
instead of
Âé
private void parseJson(JSONObject json) {
nombresLista = new ArrayList<HashMap<String, String>>();
if (json != null){
try {
JSONArray sitios = json.getJSONArray("sites");
for (int i = 0; i < sitios.length(); i++) {
JSONObject jsonObj = sitios.getJSONObject(i);
String nombre = jsonObj.getString("name");
HashMap<String, String> lista = new HashMap<String, String>();
lista.put("name", nombre);
nombresLista.add(lista);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
for (int i = 0; i < nombresLista.size(); i++) {
String nombre = nombresLista.get(i).get("name");
Log.e("", "nombre = " + nombre);
}
}