Moved writeTo to JsonObjectBase

This commit is contained in:
Benoît Blanchon
2014-06-26 13:39:05 +02:00
parent e75e3b6527
commit 48a91a219c
2 changed files with 6 additions and 5 deletions

View File

@ -45,11 +45,7 @@ public:
addItem(JSON_OBJECT, v); addItem(JSON_OBJECT, v);
} }
void writeTo(char* buffer, size_t bufferSize) using JsonObjectBase::writeTo;
{
StringBuilder sb(buffer, bufferSize);
writeTo(sb);
}
private: private:
ObjectContainer items[N]; ObjectContainer items[N];

View File

@ -11,6 +11,11 @@ class JsonObjectBase
{ {
public: public:
void writeTo(char* buffer, size_t bufferSize)
{
StringBuilder sb(buffer, bufferSize);
writeTo(sb);
}
protected: protected: