mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-20 22:12:31 +02:00
Renamed IndentedPrintDecorator to PrettyPrintDecorator
This commit is contained in:
32
JsonGenerator/PrettyPrintDecorator.h
Normal file
32
JsonGenerator/PrettyPrintDecorator.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
/*
|
||||
* Arduino JSON library
|
||||
* Benoit Blanchon 2014 - MIT License
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Print.h"
|
||||
|
||||
class PrettyPrintDecorator : public Print
|
||||
{
|
||||
public:
|
||||
|
||||
PrettyPrintDecorator(Print& p)
|
||||
: indent(0), sink(p)
|
||||
{
|
||||
previousChar = 0;
|
||||
isInAString = false;
|
||||
}
|
||||
|
||||
virtual size_t write(uint8_t);
|
||||
|
||||
private:
|
||||
int indent;
|
||||
uint8_t previousChar;
|
||||
Print& sink;
|
||||
bool isInAString;
|
||||
|
||||
size_t writeln();
|
||||
};
|
||||
|
Reference in New Issue
Block a user