Closed johnnytolengo closed 3 weeks ago
Hi @johnnytolengo,
What do you mean by "that's not working"? Did you try the ArduinoJson Troubleshooter?
Best regards, Benoit
@bblanchon I found a good solution using a custom struct + xQueueCreate.
QueueHandle_t _mqtt_queue = xQueueCreate( 1000, sizeof( struct mqtt_queue_struct ) ); //allocated in PSRAM by default
It's working very well an seems to be very safe even using multiple threads.
How is possible to save a JsonDocument in a std::vector
Thanks.
ArduinoJson has no built-in support for std::vector
.
Instead of a std::vector
, why don't you use a std::string
?
Microconroller: ESP32 with 4MB Ram ArduinoJson version: v7.1.0 Framework: Arduino Espressif 32 - 6.5.0
I am looking a way to keep a JsonArray/JsonDocument in PSRAM and update it as the data increase or decrease. Actually my application is a kind of queue for Mqtt I add data(json format) to a JsonArray when a new value arrives and I delete that data once it's sent.
SPIFF is not a candidate because of it's limited read an write cycles.
Another idea could be to allocate std::vector in PSRAM but I have not idea how it's that possible.
Probably it's there some more effective ways on how to do that ArduinoJson container. I'll appreciate any idea.