I'm making a request in python to an API i have in go using echo. I found out that python is sending the request with single quotes and i get the following error when trying to bind the request.
Request {'amount': 23,
'reference': '8000000',
'source': 'Subir Semanal'}
Error: [invalid character 'a' looking for beginning of value]
When i change the request to use double quotes it fixes it.
Is there a way to also admit single quotes as a valid string delimeter?
As far I know, single quotes in a JSON is not valid. Probably you need to convert dict to json before sending.
json.dumps({'amount': 23, 'reference': '8000000', 'source': 'Subir Semanal'})
thanks for the help!! :D it works now
Most helpful comment
As far I know, single quotes in a JSON is not valid. Probably you need to convert dict to json before sending.