JsonDocument is the entry point for using the library: it handles the memory management and calls the parser.

It implements a speed efficient memory pool and comes in two flavors:

  1. DynamicJsonDocument which is allocated on the heap and grows automatically
  2. StaticJsonDocument which is (most likely) allocated on the stack and has a fixed size.

JsonDocument is optimized of fast allocation, but doesn’t allow to free the allocated memory block. To free a JsonDocument, you must discard the entire object.

Member functions

See also