0
Good afternoon, I’m using the reqparse library, but I don’t know if it works
I’m getting a json like this:
{
"boletoPago": [
{
"numero_boleto" : 23564754,
"valor_pago" : 350.00,
"data_pagamento" : "2020-08-25"
},
{
"numero_boleto" : 28965700,
"valor_pago" : 180.00,
"data_pagamento" : "2020-08-25"
}
]
}
and I need to read every piece of these
using a code like this he only catches the first guy on the list
argumentos = reqparse.RequestParser()
argumentos.add_argument("boletoPago", type = str, required =True)
args = argumentos.parse_args()
for v in args:
print(args[v])
https://answall.com/questions/206294/pega-dados-na-structura-json-com-python I think this should help you
– Iago Petini
does not work, I need to read the list inside the json and the keys inside the lists
– Gabriel Ramos