Answer the question
In order to leave comments, you need to log in
Why Json validation error List when working with kiwi api?
I have code:
post_args = {
"id": str(int(time.time() * 1000)),
"sum": {
"amount": float(balance),
"currency": 643
},
"paymentMethod": {
"type": 'Account',
"accountId": '643'
},
"fields": {
"account": message.text
}
}
post_args['comment'] = 'Вывод денег'
s = requests.Session()
response = s.post(
url='https://edge.qiwi.com/sinap/api/v2/terms/99/payments',
json=post_args
)
data = response.json()
with open('data.json', 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=4)
{
"message": "Json validation error List((obj.sum.currency,List(JsonValidationError(List(error.expected.jsstring),WrappedArray()))))"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question