From b30a44e92af4b3651810254412f152ecd0096238 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Mon, 1 Apr 2024 21:39:01 +0200 Subject: [PATCH] Fix #16: Add overflowed() --- src/AsyncJson.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AsyncJson.h b/src/AsyncJson.h index 309092e..b2f6e2e 100644 --- a/src/AsyncJson.h +++ b/src/AsyncJson.h @@ -137,7 +137,11 @@ class AsyncJsonResponse : public AsyncAbstractResponse { return _contentLength; } - size_t getSize() { return _jsonBuffer.size(); } + size_t getSize() const { return _jsonBuffer.size(); } + +#if ARDUINOJSON_VERSION_MAJOR >= 6 + bool overflowed() const { return _jsonBuffer.overflowed(); } +#endif size_t _fillBuffer(uint8_t* data, size_t len) { ChunkPrint dest(data, _sentLength, len);