There are simple things that still cost me and I need to solve a silly interaction problem of a Map.
My project extracts information from a web service using the new Rest API.
My problem is that the moment I try to interact the Map, all the information comes in a single register.
Remark: Menu is a class that implements PropertyBusinessObject.
Response<Map> jMenu = Rest.get(SERVER_URL + "usuario/busquedaMenu").queryParam("token", Preferences.get("token", null)).acceptJson().getAsJsonMap();
if (jMenu.getResponseCode() != 200) {
Dialog.show("Error", "Lo sentimos, No existe un Menú definido para esta empresa", "Continuar", null);
return;
}
Map<Integer, Menu> m = jMenu.getResponseData();
for (Map.Entry<Integer, Menu> entry : m.entrySet()) {
System.out.println("clave=" + entry.getKey() + ", valor=" + entry.getValue());
}