Description

To improve performance, ArduinoJson allocates more memory than necessary. This function releases the unused memory.

This function is automatically called by deserializeJson().

You probably don’t need to call this function.

Example

JsonDocument doc;
doc["hello"] = "world"; 
doc.shrinkToFit();  // release overallocated memory