From 120984e6d2c4ce3a6245878b4b1e5c7f940b82e6 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 6 Apr 2017 10:10:59 +0200 Subject: [PATCH] Added getSize() to know JSON buffer size (#151) * Added doc for ws.enable and ws.enabled * added getSize() --- src/AsyncJson.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AsyncJson.h b/src/AsyncJson.h index 966a659..4d37062 100644 --- a/src/AsyncJson.h +++ b/src/AsyncJson.h @@ -72,6 +72,8 @@ class AsyncJsonResponse: public AsyncAbstractResponse { return _contentLength; } + size_t getSize() { return _jsonBuffer.size(); } + size_t _fillBuffer(uint8_t *data, size_t len){ ChunkPrint dest(data, _sentLength, len); _root.printTo( dest ) ;