Serialize inner objects

This commit is contained in:
Benoit Blanchon
2014-10-01 15:47:32 +02:00
parent 57400cee14
commit 1a98fd5dfc
2 changed files with 6 additions and 5 deletions

View File

@ -22,6 +22,9 @@ size_t JsonNodeSerializer::serialize(const JsonNode* node)
case JSON_BOOLEAN:
return _sink.print(node->content.asBoolean ? "true" : "false");
case JSON_PROXY:
return serialize(node->content.asProxy.target);
}
if (node->type >= JSON_DOUBLE_0_DECIMALS)

View File

@ -21,8 +21,6 @@ protected:
}
JsonObject object;
private:
StaticJsonBuffer<5> json;
};
@ -134,12 +132,12 @@ TEST_F(JsonObjectSerializationTests, OneEmptyNestedArray)
outputMustBe("{\"key\":[]}");
}
*/
TEST_F(JsonObjectSerializationTests, OneEmptyNestedObject)
{
auto nestedObject = JsonObject<1>();
auto nestedObject = json.createObject();
object["key"] = nestedObject;
outputMustBe("{\"key\":{}}");
}*/
}