cendon Posted November 9, 2022 Report Share Posted November 9, 2022 Boa noite Srs, estou tentando ler um retorno em Json, não estou conseguindo. Tentei apenas converter com o hb_JSONDecode e mostrar no xbrowse tentei tbm ler uma tabela multidimensional tbm não obtive sucesso, algum santo para me dar uma ajuda? abaixo o fonte Function Aj_decode() local resultado, Aarray TEXT INTO resultado { "status": "success", "message": [ { "simpleDebitoPayment": { "id": "0000007112022", "payerName": "ALLYSON CIRINO PEREIRA DA SILVA", "amount": 15.00, "scheduledDate": "2022-11-24T10:21:50.132", "payerDocument": 1452034680, "beneficiaryDocument": 13102672000150, "description": "DEBITO SEGURO", "bank": 33, "branch": "3476", "account": "2017801", "branchDigit": "2", "accountDigit": "9" }, "valid": false, "errors": [ { "message": "P0001: Err284: Payment 0000007112022 Already Exists in 1185" } ] }, { "simpleDebitoPayment": { "id": "0000009112022", "payerName": "RAIKA LUANA FERREIRA MARTINS", "amount": 15.00, "scheduledDate": "2022-11-24T10:21:50.132", "payerDocument": 11754817696, "beneficiaryDocument": 13102672000150, "description": "DEBITO SEGURO", "bank": 237, "branch": "3728", "account": "510767", "branchDigit": "1", "accountDigit": "9" }, "valid": false, "errors": [ { "message": "P0001: Err284: Payment 0000009112022 Already Exists in 1185" } ] }, { "simpleDebitoPayment": { "id": "0000010112022", "payerName": "CLEITON HONORIO DE OLIVEIRA", "amount": 15.00, "scheduledDate": "2022-11-24T10:21:50.132", "payerDocument": 7825483936, "beneficiaryDocument": 13102672000150, "description": "DEBITO SEGURO", "bank": 341, "branch": "2776", "account": "23893", "branchDigit": "6", "accountDigit": "9" }, "valid": false, "errors": [ { "message": "P0001: Err284: Payment 0000010112022 Already Exists in 1185" } ] } ] } endtext x1 := hb_jsonDecode( resultado, @aArray ) IF aArray == nil MsgStop( "Erro ao retornar os dados. Tente novamente." ) RETURN NIL ENDIF xbrowse(Aarray) return Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 10, 2022 Report Share Posted November 10, 2022 Veja se ajuda: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=42433&sid=3a14a8cf2995291bb03dd755cf26cfd3 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
cendon Posted November 10, 2022 Author Report Share Posted November 10, 2022 Bom dia Kapi, tudo bom? Vale amigo! Resolveu, só depois percebi que o xbrowse é multidimensional tem de clicar para aparecer os outros dados, rsrsr. Obrigado! Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 10, 2022 Report Share Posted November 10, 2022 Angelo my dear friend fiquei curioso, o que é um xbrowse multidimensional? Pode mostrar um pequeno exemplo, por favor? Obg. abs. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.