forked from bblanchon/ArduinoJson
Added a test that stores a long in a JsonValue
This commit is contained in:
@ -14,13 +14,23 @@ size_t JsonValue::printBoolTo(Print& p) const
|
||||
|
||||
size_t JsonValue::printDoubleTo(Print& p) const
|
||||
{
|
||||
char tmp[16];
|
||||
char tmp[32];
|
||||
|
||||
sprintf(tmp, "%lg", content.asDouble);
|
||||
|
||||
return p.write(tmp);
|
||||
}
|
||||
|
||||
size_t JsonValue::printLongTo(Print& p) const
|
||||
{
|
||||
char tmp[32];
|
||||
|
||||
sprintf(tmp, "%ld", content.asLong);
|
||||
|
||||
return p.write(tmp);
|
||||
}
|
||||
|
||||
|
||||
size_t JsonValue::printPrintableTo(Print& p) const
|
||||
{
|
||||
if (content.asPrintable)
|
||||
|
Reference in New Issue
Block a user