forked from bblanchon/ArduinoJson
Added JsonContainer::prettyPrintTo()
This commit is contained in:
1 parent
b6799dc231
commit
7a40711af3
19 files changed
+454
-108
No files matched your search
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "../Internals/JsonWriter.h"
|
||||
|
||||
class CompactJsonWriter : public JsonWriter
|
||||
{
|
||||
public:
|
||||
explicit CompactJsonWriter(Print& sink)
|
||||
: JsonWriter(sink)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void beginArray()
|
||||
{
|
||||
_length += _sink.write('[');
|
||||
}
|
||||
|
||||
virtual void endArray()
|
||||
{
|
||||
_length += _sink.write(']');
|
||||
}
|
||||
|
||||
virtual void writeColon()
|
||||
{
|
||||
_length += _sink.write(':');
|
||||
}
|
||||
|
||||
virtual void writeComma()
|
||||
{
|
||||
_length += _sink.write(',');
|
||||
}
|
||||
|
||||
virtual void beginObject()
|
||||
{
|
||||
_length += _sink.write('{');
|
||||
}
|
||||
|
||||
virtual void endObject()
|
||||
{
|
||||
_length += _sink.write('}');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user