mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Added setTabSize()
This commit is contained in:
@@ -19,6 +19,7 @@ namespace ArduinoJson
|
||||
: sink(p)
|
||||
{
|
||||
level = 0;
|
||||
tabSize = 1;
|
||||
isNewLine = true;
|
||||
}
|
||||
|
||||
@@ -26,13 +27,18 @@ namespace ArduinoJson
|
||||
|
||||
void indent();
|
||||
void unindent();
|
||||
void setTabSize(uint8_t n);
|
||||
|
||||
private:
|
||||
Print& sink;
|
||||
uint8_t level : 7;
|
||||
uint8_t level : 4;
|
||||
uint8_t tabSize : 3;
|
||||
bool isNewLine : 1;
|
||||
|
||||
|
||||
size_t writeTabs();
|
||||
|
||||
const int MAX_LEVEL = 15; // because it's only 4 bits
|
||||
const int MAX_TAB_SIZE = 7; // because it's only 3 bits
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user