Closed gmgunderground closed 1 month ago
I found the problem, as reported in documentation serializeJsonPretty acept char and i'm using "unsigned char" because I'm using a memory buffer size_t serializeJsonPretty(const JsonDocument& doc, char output[size]); from the mempry perspetive char and unsigned char are the same element, baut if I use (and is not rare to use a unsigned char buffers in embedded) I can't serialize my object if I don't create a slow my custom writer
Hi @gmgunderground,
I don't get any error with the provided sample code. See this online demo: https://wandbox.org/permlink/Tu38w0wCx8SNfy7F
Please provide a sample code that reproduces the error.
Best regards, Benoit
Description invalid use of array with unspecified bounds
.pio\libdeps\uno_r4minima\ArduinoJson\src/ArduinoJson/Serialization/Writer.hpp:22:19: error: invalid use of array with unspecified bounds return dest->write(s, n);
Troubleshooter's report
Environment
Reproduction code