mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-09-25 22:40:56 +02:00
Updated Avoiding pitfalls (markdown)
@@ -105,7 +105,7 @@ The simplest solution is to explicitly duplicate the strings in the `JsonBuffer`
|
|||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
char buffer[16];
|
char buffer[16];
|
||||||
sprintf(buffer, "iteration %d", 0);
|
sprintf(buffer, "iteration %d", 0);
|
||||||
array.add(jsonBuffer.strlen(buffer));
|
array.add(jsonBuffer.strdup(buffer));
|
||||||
}
|
}
|
||||||
array.printTo(Serial);
|
array.printTo(Serial);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user