mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-22 14:57:33 +02:00
Redesigned JsonVariant to leverage converting constructors instead of assignment operators
This commit is contained in:
@ -16,8 +16,8 @@ void setup() {
|
||||
root["time"] = 1351824120;
|
||||
|
||||
JsonArray& data = root.createNestedArray("data");
|
||||
data.add(48.756080, 6); // 6 is the number of decimals to print
|
||||
data.add(2.302038, 6); // if not specified, 2 digits are printed
|
||||
data.add(double_with_n_digits(48.756080, 6));
|
||||
data.add(double_with_n_digits(2.302038, 6));
|
||||
|
||||
root.printTo(Serial);
|
||||
// This prints:
|
||||
|
Reference in New Issue
Block a user