Updated FAQ (markdown)

Benoît Blanchon
2016-09-29 11:39:44 +02:00
parent 1e0bfa97fe
commit 6e3168e7f2

16
FAQ.md

@@ -13,6 +13,7 @@
- [How to write a function that works with both `JsonArray` and `JsonObject`?](#how-to-write-a-function-that-works-with-both-jsonarray-and-jsonobject) - [How to write a function that works with both `JsonArray` and `JsonObject`?](#how-to-write-a-function-that-works-with-both-jsonarray-and-jsonobject)
- [How to assign a `JsonArray` or `JsonObject`?](#how-to-assign-a-jsonarray-or-jsonobject) - [How to assign a `JsonArray` or `JsonObject`?](#how-to-assign-a-jsonarray-or-jsonobject)
- [Part 2 - Serialization questions](#part-2---serialization-questions) - [Part 2 - Serialization questions](#part-2---serialization-questions)
- [Why some parts are missing?](#why-some-parts-are-missing)
- [How to compute the JSON length?](#how-to-compute-the-json-length) - [How to compute the JSON length?](#how-to-compute-the-json-length)
- [How to create complex nested objects?](#how-to-create-complex-nested-objects) - [How to create complex nested objects?](#how-to-create-complex-nested-objects)
- [The first serialization succeeds, why do the next ones fail?](#the-first-serialization-succeeds-why-do-the-next-ones-fail) - [The first serialization succeeds, why do the next ones fail?](#the-first-serialization-succeeds-why-do-the-next-ones-fail)
@@ -336,6 +337,21 @@ See issues [#341](https://github.com/bblanchon/ArduinoJson/issues/341) and [#343
## Part 2 - Serialization questions ## Part 2 - Serialization questions
### Why some parts are missing?
Example: you want to write `{"p1":[0, 1]}`, but instead you get `{"p1":[]}`.
This is because the `StaticJsonBuffer` too small.
Solution: Increase the size of the `StaticJsonBuffer` or switch to a `DynamicJsonBuffer`.
See also:
* [What are the differences between StaticJsonBuffer and DynamicJsonBuffer?](#what-are-the-differences-between-staticjsonbuffer-and-dynamicjsonbuffer)
* [How to determine the buffer size?](#how-to-determine-the-buffer-size)
* [JsonBuffer size calculator](https://rawgit.com/bblanchon/ArduinoJson/master/scripts/buffer-size-calculator.html)
* Issue [#360](https://github.com/bblanchon/ArduinoJson/issues/360)
### How to compute the JSON length? ### How to compute the JSON length?