mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-17 19:41:16 +02:00
Updated FAQ (markdown)
4
FAQ.md
4
FAQ.md
@@ -116,7 +116,7 @@ struct SensorData {
|
||||
bool deserialize(SensorData& data, const char* json)
|
||||
{
|
||||
StaticJsonBuffer<SENSORDATA_JSON_SIZE> jsonBuffer;
|
||||
JsonObject& root = jsonBuffer.parseObject(json)
|
||||
JsonObject& root = jsonBuffer.parseObject(json);
|
||||
data.name = json["name"];
|
||||
data.time = json["time"];
|
||||
data.value = json["value"];
|
||||
@@ -126,7 +126,7 @@ bool deserialize(SensorData& data, const char* json)
|
||||
void serialize(const SensorData& data, char* json, size_t maxSize)
|
||||
{
|
||||
StaticJsonBuffer<SENSORDATA_JSON_SIZE> jsonBuffer;
|
||||
JsonObject& root = jsonBuffer.createObject()
|
||||
JsonObject& root = jsonBuffer.createObject();
|
||||
root["name"] = data.name;
|
||||
root["time"] = data.time;
|
||||
root["value"] = data.value;
|
||||
|
Reference in New Issue
Block a user