diff options
Diffstat (limited to 'include/lib/ArduinoJson/Serialization/DummyPrint.hpp')
-rw-r--r-- | include/lib/ArduinoJson/Serialization/DummyPrint.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/lib/ArduinoJson/Serialization/DummyPrint.hpp b/include/lib/ArduinoJson/Serialization/DummyPrint.hpp new file mode 100644 index 0000000..9fdf2d6 --- /dev/null +++ b/include/lib/ArduinoJson/Serialization/DummyPrint.hpp @@ -0,0 +1,22 @@ +// ArduinoJson - arduinojson.org +// Copyright Benoit Blanchon 2014-2018 +// MIT License + +#pragma once + +namespace ArduinoJson { +namespace Internals { + +// A dummy Print implementation used in JsonPrintable::measureLength() +class DummyPrint { + public: + size_t print(char) { + return 1; + } + + size_t print(const char* s) { + return strlen(s); + } +}; +} +} |