forked from bblanchon/ArduinoJson
Added JsonPrintable.prettyPrintTo(Print&)
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "JsonValue.h"
|
||||
#include "Print.h"
|
||||
#include "Printable.h"
|
||||
#include "IndentedPrintDecorator.h"
|
||||
|
||||
namespace ArduinoJson
|
||||
{
|
||||
@ -25,6 +26,12 @@ namespace ArduinoJson
|
||||
return printTo(sb);
|
||||
}
|
||||
|
||||
size_t prettyPrintTo(Print& p) const
|
||||
{
|
||||
IndentedPrintDecorator decorator(p);
|
||||
return printTo(decorator);
|
||||
}
|
||||
|
||||
virtual size_t printTo(Print& p) const = 0;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user