Recibí un comentario sobre tu código que podría ayudar. La siguiente línea es inútil
JSONObject object = new JSONObject(json.toString());
como puedes usar json como su JSONObject en lugar de crear uno nuevo.
Recibí un comentario sobre tu código que podría ayudar. La siguiente línea es inútil
JSONObject object = new JSONObject(json.toString());
como puedes usar json como su JSONObject en lugar de crear uno nuevo.