Closed higaski closed 4 months ago
Hi @higaski,
The current implementation allocates the memory pools lazily, so an empty JsonDocument
doesn't require any heap allocation.
You can confirm that by replacing the allocator: https://wandbox.org/permlink/p07bfdAXL9johHby
Best regards, Benoit
Thanks for clearing that up!
The v6 documentation contains a small
validateJson
snippet which I have always found immensely useful:Now, the v7 documentation contains an equivalent snippet, but I've red that Static- and DynamicJsonDocument got merged into a single class which now always allocates in 1kB blocks. Does this mean that
validateJson
now allocates 2x1kB?