Hello, I have a need in an application to consult an API where my client will enter the document number and this document may be linked to more than one contract and the API returns me a Json with all the contracts and their respective information, I need to take each contract number and play it in a listview.
I managed to do it with clients who have only one contract, but clients who have more than one contract, I still couldn’t understand how to go through the text and get this specific information.
Here is a JSON model:
{
"msg": "Contrato(s) Localizado(s)",
"contratos": [
{
"cobPermuta": false,
"contratoCentralSenha": "iumox1010",
"endereco_complemento": null,
"popNome": "RIBEIRAO PRETO/SP",
"contratoStatus": 1,
"endereco_uf": "SP",
"servico_plano": "Webnet 50 Megas",
"endereco_pontoreferencia": null,
"cobIsento": 0.0,
"cpfCnpj": "2173617883",
"endereco_logradouro": "RANGEL PESTANA",
"contratoStatusModo": 2,
"telefones": [
"(16) 9528-23434",
"(16)3714-1600"
],
"contratoStatusDisplay": " Ativo ",
"endereco_numero": 257,
"contratoValorAberto": 0.0,
"planointernet": "Webnet 50 Megas",
"servico_login": "pine-gacho",
"endereco_bairro": "VILA VIRGINIA",
"emails": [
"[email protected]"
],
"razaoSocial": "DANILO GUSTAVO DE PAULA",
"servico_mac": "",
"contratoTitulosAReceber": 0,
"popId": 1,
"endereco_cep": "14030-210",
"promessasPagamentoMes": 0,
"endereco_cidade": "RIBEIRAO PRETO",
"servico_senha": "jolkikju887h",
"clienteId": 1,
"contratoId": 10000
},
{
"cobPermuta": false,
"contratoCentralSenha": "andradas700",
"endereco_complemento": "",
"popNome": "RIBEIRAO PRETO/SP",
"contratoStatus": 1,
"endereco_uf": "SP",
"servico_plano": "20_MEGAS",
"endereco_pontoreferencia": "",
"cobIsento": 0.0,
"cpfCnpj": "21187617883",
"endereco_logradouro": "RANGEL PESTANA",
"contratoStatusModo": 2,
"telefones": [
"(16) 9898-23434",
"(16)3954-1600"
],
"contratoStatusDisplay": " Ativo ",
"endereco_numero": 257,
"contratoValorAberto": 0.0,
"planointernet": "20_MEGAS",
"servico_login": "grita_rapuru",
"endereco_bairro": "VILA VIRGINIA",
"emails": [
"[email protected]"
],
"razaoSocial": "DANILO GUSTAVO DE PAULA",
"servico_mac": "58:10:8C:5D:2C:2A",
"contratoTitulosAReceber": 0,
"popId": 1,
"endereco_cep": "14030-210",
"promessasPagamentoMes": 0,
"endereco_cidade": "RIBEIRAO PRETO",
"servico_senha": "0o9as700",
"clienteId": 1,
"contratoId": 10007
}
]
}
Thanks in advance!