| 1234567891011121314151617181920 |
- // ArduinoJson - arduinojson.org
- // Copyright Benoit Blanchon 2014-2018
- // MIT License
- #include <ArduinoJson.h>
- #include <catch.hpp>
- TEST_CASE("StaticJsonDocument") {
- StaticJsonDocument<200> doc;
- SECTION("serializeJson()") {
- JsonObject obj = doc.to<JsonObject>();
- obj["hello"] = "world";
- std::string json;
- serializeJson(doc, json);
- REQUIRE(json == "{\"hello\":\"world\"}");
- }
- }
|