From b5551142d8670bd4069e72c6d7d09b8f6fef0123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Tue, 15 Mar 2016 10:28:10 +0100 Subject: [PATCH] Updated FAQ (markdown) --- FAQ.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index f006ef5..84b04f6 100644 --- a/FAQ.md +++ b/FAQ.md @@ -99,7 +99,9 @@ To avoid any duplication, make sure you use an input of type `char*` or `char[]` See issues [#154](https://github.com/bblanchon/ArduinoJson/issues/154), [#177](https://github.com/bblanchon/ArduinoJson/issues/177), [#179](https://github.com/bblanchon/ArduinoJson/issues/179) and [#223](https://github.com/bblanchon/ArduinoJson/issues/223). -### The first parsing succeeds, why does the next ones fail? +### The first parsing succeeds, why do the next ones fail? +or +### The first serialization succeeds, why do the next ones fail? This can be due to two causes. @@ -143,6 +145,8 @@ for (int i=0; i<10; i++) { Note that, contrary to a common belief, moving a `StaticJsonBuffer` inside of a loop has no negative impact on performance. +See issue [#243](https://github.com/bblanchon/ArduinoJson/issues/243). + ##### Cause 2: reuse of JSON input In order to make the JSON parsing without any allocation or duplication, ArduinoJson modifies the string in place: it inserts null terminators and unescapes special characters. @@ -370,7 +374,7 @@ The third solution is to run your program an print `jsonBuffer.size()` to get th **WARNING**: if you use `String` to create your JSON keys or values, there content will automatically be duplicated in the `JsonBuffer`, so you need to add the total length of all strings in the size of the `JsonBuffer`. -See issue [#243](https://github.com/bblanchon/ArduinoJson/issues/243#issuecomment-196553398) +See issue [#243](https://github.com/bblanchon/ArduinoJson/issues/243) ### I found a memory leak in the library!