Cleaning up...

This commit is contained in:
Benoit Blanchon
2014-10-31 12:02:15 +01:00
parent a5dbb397ca
commit 5443e90baf
11 changed files with 47 additions and 86 deletions

View File

@@ -18,12 +18,12 @@ class JsonWriter {
size_t bytesWritten() { return _length; }
virtual void beginArray() = 0;
virtual void endArray() = 0;
void writeEmptyArray() { _length += _sink->print("[]"); }
virtual void beginObject() = 0;
virtual void endObject() = 0;
void writeEmptyObject() { _length += _sink->print("{}"); }
void writeString(const char *value);
void writeInteger(long value);
@@ -31,13 +31,8 @@ class JsonWriter {
void writeDouble(double value, int decimals);
virtual void writeColon() = 0;
virtual void writeComma() = 0;
void writeEmptyArray() { _length += _sink->print("[]"); }
void writeEmptyObject() { _length += _sink->print("{}"); }
protected:
Print *_sink;
size_t _length;