You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi for example i want send jpeg image from ESP32 camera (through for example MQTT) using Json, so i must encode jpeg data as base64. And its vaste of memory store jpeg in memory again even bigger because encoded as base64. So i patched ArduinoJson library to do it incrementaly
i created Abstract class DynamicData
I expect to add a similar feature in the future but not right now.
Now is not the right time because it would require C++11 and virtual functions, two things that are forbidden by ArduinoJson 6 design constraints.
This feature should not be called "Incremental serializer" (#206, #210, #1690) and but "Lazy value serialization" (#1713).
BTW, using JSON to store an image is extremely inefficient.
You should consider alternative solutions.
Hi for example i want send jpeg image from ESP32 camera (through for example MQTT) using Json, so i must encode jpeg data as base64. And its vaste of memory store jpeg in memory again even bigger because encoded as base64. So i patched ArduinoJson library to do it incrementaly
i created Abstract class DynamicData
writeJsonTo
write data for Json serializer using pointer to write funcwriteRawTo
write data for MessagePack serializer using pointer to write funcand then i for example create Base64 encoder inherited from Dynamic data and i use it
and after compile and run i got
so it works perfectelly.
Do you want patch ? It is usefull for others ?
it is in my fork ...
The text was updated successfully, but these errors were encountered: