I have this JSON object:
{ \"1\":{ \"id_module\":\"f83d6101cc\", \"adresse_mac\":\"00:6A:8E:16:C6:26\", \"mot_de_passe\":\"mp0001\",\"name\":\
Try this:
String json = {"1":{"id_module":"f83d6101cc","adresse_mac":"00:6A:8E:16:C6:26","mot_de_passe":"mp0001","name":"a"},"2":{"id_module":"64eae5403b","adresse_mac":"00:6A:8E:16:C6:26","mot_de_passe":"mp0002","name":"a"}}
Then:
JSONObject obj = new JSONObject(json);
Hope it will help.