Ion Json Android [closed]

1

I am working with this library link and I am not able to manipulate the data return via JSON of the following format

[{"id":"1","nome":"XXX","cidade":"XXXXXXX"},{"id":"2","nome":"XXXX","cidade":"XX‌​XXXXXXXX"}] 

JsonObject json = new JsonObject();

Ion.with(context)
.load("http://example.com/post")
.setJsonObjectBody(json)
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
   @Override
    public void onCompleted(Exception e, JsonObject result) {
       // COMO TRABALHAR ELES AQUI????
    }
});
    
asked by anonymous 29.03.2016 / 12:51

1 answer

-1

In this case, you need to get the return as .asJsonArray() and not as .asJsonObject() .

    
24.11.2016 / 01:36