2014-06-25 13:23:08 +02:00
|
|
|
/*
|
|
|
|
* Arduino JSON library
|
|
|
|
* Benoit Blanchon 2014 - MIT License
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-06-27 13:42:26 +02:00
|
|
|
#include "JsonValue.h"
|
2014-07-01 13:36:22 +02:00
|
|
|
#include "Print.h"
|
2014-07-01 13:44:36 +02:00
|
|
|
#include "Printable.h"
|
2014-06-25 13:23:08 +02:00
|
|
|
|
2014-07-01 13:44:36 +02:00
|
|
|
class JsonObjectBase : public Printable
|
2014-06-25 13:23:08 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-07-01 14:08:15 +02:00
|
|
|
size_t printTo(char* buffer, size_t bufferSize)
|
2014-06-26 13:39:05 +02:00
|
|
|
{
|
|
|
|
StringBuilder sb(buffer, bufferSize);
|
2014-07-01 14:08:15 +02:00
|
|
|
return printTo(sb);
|
2014-06-26 13:39:05 +02:00
|
|
|
}
|
2014-06-25 13:23:08 +02:00
|
|
|
|
2014-07-01 14:08:15 +02:00
|
|
|
virtual size_t printTo(Print& p) const = 0;
|
2014-06-25 13:23:08 +02:00
|
|
|
};
|
|
|
|
|