Updated FAQ (markdown)

Benoît Blanchon
2016-03-15 10:28:10 +01:00
parent dfeccf7ffc
commit b5551142d8

8
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). 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. 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. 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 ##### 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. 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`. **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! ### I found a memory leak in the library!