7#define ARDUINOJSON_ENABLE_STD_STRING 1
9#define ARDUINOJSON_USE_LONG_LONG 1
11#include <ArduinoJson.h>
53JsonDocument
parse_json(
const std::string &data);
60 root_ = doc_.to<JsonObject>();
71 JsonDocument doc_{&allocator_};
76 bool root_created_{
false};
An STL allocator that uses SPI or internal RAM.
T * reallocate(T *p, size_t n)
Builder class for creating JSON documents without lambdas.
std::function< void(JsonObject)> json_build_t
Callback function typedef for building JsonObjects.
bool parse_json(const std::string &data, const json_parse_t &f)
Parse a JSON string and run the provided json parse function if it's valid.
std::string build_json(const json_build_t &f)
Build a JSON string with the provided json build function.
std::function< bool(JsonObject)> json_parse_t
Callback function typedef for parsing JsonObjects.
Providing packet encoding functions for exchanging data with a remote host.
void deallocate(void *ptr) override
void * allocate(size_t size) override
RAMAllocator< uint8_t > allocator_
void * reallocate(void *ptr, size_t new_size) override