Minor changes in the examples

This commit is contained in:
Benoit Blanchon
2018-06-07 11:21:54 +02:00
parent e86eb0cfdf
commit 393f352b70
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ void setup() {
Serial.begin(9600); Serial.begin(9600);
while (!Serial) continue; while (!Serial) continue;
// The JSON document // Allocate the JSON document
// //
// Inside the brackets, 200 is the RAM allocated to this document. // Inside the brackets, 200 is the RAM allocated to this document.
// Don't forget to change this value to match your requirement. // Don't forget to change this value to match your requirement.

View File

@ -11,7 +11,7 @@ void setup() {
Serial.begin(9600); Serial.begin(9600);
while (!Serial) continue; while (!Serial) continue;
// Root JSON object // Allocate the JSON document
// //
// Inside the brackets, 200 is the size of the memory pool in bytes. // Inside the brackets, 200 is the size of the memory pool in bytes.
// Don't forget to change this value to match your JSON document. // Don't forget to change this value to match your JSON document.
@ -47,7 +47,7 @@ void setup() {
// Fetch values. // Fetch values.
// //
// Most of the time, you can rely on the implicit casts. // Most of the time, you can rely on the implicit casts.
// In other case, you can do doc["time"].as<long>(); // In other case, you can do root["time"].as<long>();
const char* sensor = root["sensor"]; const char* sensor = root["sensor"];
long time = root["time"]; long time = root["time"];
double latitude = root["data"][0]; double latitude = root["data"][0];

View File

@ -60,7 +60,7 @@ void setup() {
// Fetch values. // Fetch values.
// //
// Most of the time, you can rely on the implicit casts. // Most of the time, you can rely on the implicit casts.
// In other case, you can do doc["time"].as<long>(); // In other case, you can do root["time"].as<long>();
const char* sensor = root["sensor"]; const char* sensor = root["sensor"];
long time = root["time"]; long time = root["time"];
double latitude = root["data"][0]; double latitude = root["data"][0];