I'm having issues with my circuit python project reading JSON response from my web service. The output looks correct in Postman but I receive the following error, TypeError: object with buffer protocol required. However if I double serialize my JSON, serialize my object and then serialize that result my Python script works.
Sorry if a noob question but I'm not getting it.
response = http.post(WS_URL, json=WS_JSON)
responseJSON = json.loads(response.json())
JSON parsing
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: JSON parsing
Can you provide more information? The JSON that you get from the server and the complete REPL error information.
Dave
Dave
- superg2
- Posts: 41
- Joined: Wed Aug 31, 2022 12:27 pm
Re: JSON parsing
Just resolved the issue, I didn't know that JSON was case sensitive and something changed in my web service started to return JSON in Camel Case and not Pascal case. Not sure what I changed for that to happen but off to look into the service
Please be positive and constructive with your questions and comments.