mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
remove PrettyAsyncJsonResponse
This commit is contained in:
@@ -89,24 +89,24 @@ class AsyncJsonResponse : public AsyncAbstractResponse {
|
||||
}
|
||||
};
|
||||
|
||||
class PrettyAsyncJsonResponse : public AsyncJsonResponse {
|
||||
public:
|
||||
PrettyAsyncJsonResponse(bool isArray = false)
|
||||
: AsyncJsonResponse{isArray} {
|
||||
}
|
||||
size_t setLength() {
|
||||
_contentLength = measureJsonPretty(_root);
|
||||
if (_contentLength) {
|
||||
_isValid = true;
|
||||
}
|
||||
return _contentLength;
|
||||
}
|
||||
size_t _fillBuffer(uint8_t * data, size_t len) {
|
||||
ChunkPrint dest(data, _sentLength, len);
|
||||
serializeJsonPretty(_root, dest);
|
||||
return len;
|
||||
}
|
||||
};
|
||||
// class PrettyAsyncJsonResponse : public AsyncJsonResponse {
|
||||
// public:
|
||||
// PrettyAsyncJsonResponse(bool isArray = false)
|
||||
// : AsyncJsonResponse{isArray} {
|
||||
// }
|
||||
// size_t setLength() {
|
||||
// _contentLength = measureJsonPretty(_root);
|
||||
// if (_contentLength) {
|
||||
// _isValid = true;
|
||||
// }
|
||||
// return _contentLength;
|
||||
// }
|
||||
// size_t _fillBuffer(uint8_t * data, size_t len) {
|
||||
// ChunkPrint dest(data, _sentLength, len);
|
||||
// serializeJsonPretty(_root, dest);
|
||||
// return len;
|
||||
// }
|
||||
// };
|
||||
|
||||
typedef std::function<void(AsyncWebServerRequest * request, JsonVariant json)> ArJsonRequestHandlerFunction;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user