mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-22 23:07:29 +02:00
Made EscapedString pure static
This commit is contained in:
@ -14,20 +14,6 @@ namespace ArduinoJson
|
||||
class EscapedString
|
||||
{
|
||||
public:
|
||||
|
||||
EscapedString(const char* s)
|
||||
: rawString(s)
|
||||
{
|
||||
}
|
||||
|
||||
size_t printTo(Print& p) const
|
||||
{
|
||||
return printTo(rawString, p);
|
||||
}
|
||||
|
||||
private:
|
||||
const char* rawString;
|
||||
|
||||
static size_t printTo(const char*, Print&);
|
||||
};
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ size_t JsonObjectBase::printTo(Print& p) const
|
||||
const KeyValuePair* current = items;
|
||||
for (int i = count; i > 0; i--)
|
||||
{
|
||||
n += EscapedString(current->key).printTo(p);
|
||||
n += EscapedString::printTo(current->key, p);
|
||||
n += p.write(':');
|
||||
n += current->value.printTo(p);
|
||||
|
||||
|
@ -31,5 +31,5 @@ size_t JsonValue::printPrintableTo(const Content& c, Print& p)
|
||||
|
||||
size_t JsonValue::printStringTo(const Content& c, Print& p)
|
||||
{
|
||||
return EscapedString(c.asString).printTo(p);
|
||||
return EscapedString::printTo(c.asString, p);
|
||||
}
|
Reference in New Issue
Block a user