From 78203f5e27dd031e95afcb673efbd952056aa045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Wed, 28 Oct 2015 16:09:32 +0100 Subject: [PATCH] Updated FAQ (markdown) --- FAQ.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index 503b0ac..9536175 100644 --- a/FAQ.md +++ b/FAQ.md @@ -111,9 +111,11 @@ struct SensorData { float value; }; +#define SENSORDATA_JSON_SIZE (JSON_OBJECT_SIZE(3)) + bool deserialize(SensorData& data, const char* json) { - StaticJsonBuffer<200> jsonBuffer; + StaticJsonBuffer jsonBuffer; JsonObject& root = jsonBuffer.parseObject(json) data.name = json["name"]; data.time = json["time"]; @@ -123,7 +125,7 @@ bool deserialize(SensorData& data, const char* json) void serialize(const SensorData& data, char* json, size_t maxSize) { - StaticJsonBuffer<200> jsonBuffer; + StaticJsonBuffer jsonBuffer; JsonObject& root = jsonBuffer.createObject() root["name"] = data.name; root["time"] = data.time;