Closed foskam closed 6 months ago
Hi @foskam,
client.getString()
consumes the stream before deserializeJson()
has a chance to read it.
This explains why it returns EmptyInput
.
Solution: remove the call to getString()
.
Best regards, Benoit
Thanks! That solved it… pretty logical now I think of it 😉
You're welcome, @foskam. Thank you for using ArduinoJson! Don't forget to cast a star to support the project :wink:
Description I tried everything. Deserialize using http.getString(), convert that to char*, using http.getStream... but always I get the EmptyInput error. When I send http.getString() to the serial it is not empty though... I want to get the JSON from this public webservice: http://worldtimeapi.org/api/timezone/Europe/Amsterdam
Troubleshooter's report
deserializeJson()
returnsEmptyInput
String
Stream
todeserializeJson()
doesn't fix the issueEnvironment
Reproduction code