Files

19 lines
345 B
C++
Raw Permalink Normal View History

// ArduinoJson - https://arduinojson.org
2026-07-06 18:35:16 +02:00
// Copyright © 2014-2026, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
#include <string>
TEST_CASE("Implicit cast to JsonVariant") {
JsonDocument doc;
doc["hello"] = "world";
JsonVariant var = doc;
CHECK(var.as<std::string>() == "{\"hello\":\"world\"}");
}