Hello,
I'm trying to get an array or JSONObject like this :
JSONArray array = new JSONArray();
JSONObject jsonResponse = new JSONObject();
jsonResponse.put("Login", players.get(i).Login);
array.put(jsonResponse);
...
return new HttpResponseObject(HTTP_STATUS_SUCCESS,
array.toJSONObject(array));
Here's what I get :
Success : {"{\"Login\":\"3dduck\",\"Wifes\":1,\"Diamonds\":21,\"MoneyBuilding\":435}":{"Login":"3dduck", "Wifes":"1", "Diamonds":"21", "MoneyBuilding":"435"}, "{\"Login\":\"gamecat\",\"Wifes\":2,\"Diamonds\":0,\"MoneyBuilding\":166}":{"Login":"gamecat", "Wifes":"2", "Diamonds":"0", "MoneyBuilding":"166"}, "{\"Login\":\"Mechant Raton\",\"Wifes\":20,\"Diamonds\":550,\"MoneyBuilding\":1420}":{"Login":"Mechant Raton", "Wifes":"20", "Diamonds":"550", "MoneyBuilding":"1420"}}
I get everything in double, what did I wrong ?
Thank you, your support is amazing !