forked from bblanchon/ArduinoJson
Added a test that stores a long in a JsonValue
This commit is contained in:
1 parent
1fba9767d3
commit
937837848c
3 files changed
+33
-8
No files matched your search
@@ -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