1
There’s no way I can get the valuables.
The value received by JSON are these:
{
"status": true,
"valores": {
"galo": {
"nome": "galinho",
"valor": 300,
"ultima_consulta": 1386349203,
"fonte": "galo.com.br"
}
}
}
I’ve tried everything, nothing’s right.
RespostaServidor respostaServidor = response.body();
Valores valores = respostaServidor.getValores();
galo = valores.getGalo();
In class respostaServidor
, he gets the status
right, and the object, but then passes the null value to the rooster.
I don’t know what else to do.
Rooster is an object within json, a "son". For example: { "request": 1, "items": { "codItem": 1 } } jsonObject objectPedido = json.getObject("request"); .... , and then read the items like this: objectPedido.getObject("items");
– Carlos Bridi
Post the class Values.
– ramaral