Added an overload of prettyPrintTo()

This commit is contained in:
Benoit Blanchon
2014-09-01 21:22:56 +02:00
parent cd88fb0882
commit 763aa7fe37
2 changed files with 9 additions and 2 deletions

View File

@ -10,12 +10,18 @@
using namespace ArduinoJson::Generator;
using namespace ArduinoJson::Internals;
size_t JsonPrintable::printTo(char* buffer, size_t bufferSize)
size_t JsonPrintable::printTo(char* buffer, size_t bufferSize) const
{
StringBuilder sb(buffer, bufferSize);
return printTo(sb);
}
size_t JsonPrintable::prettyPrintTo(char* buffer, size_t bufferSize) const
{
StringBuilder sb(buffer, bufferSize);
return prettyPrintTo(sb);
}
size_t JsonPrintable::prettyPrintTo(IndentedPrint& p) const
{
JsonPrettyPrint prettyPrint(p);