FastLED 3.9.15
Loading...
Searching...
No Matches

◆ set() [4/10]

void fl::json::set ( const fl::string & key,
const json & value )
inline

Definition at line 701 of file json.h.

703 {
704 if (!mValue || !mValue->is_object()) {
706 }
707 // Directly assign the value to the object without going through json::operator[]
708 auto objPtr = mValue->data.ptr<json_object>();
709 if (objPtr) {
710 // Create or update the entry directly
711 if (value.mValue) {
712 (*objPtr)[key] = value.mValue;
713 } else {
714 // If value has null mValue, create a null json_value
715 (*objPtr)[key] = fl::make_shared<json_value>(nullptr);
716 }
fl::shared_ptr< json_value > mValue
Definition json.h:130
T value() const FL_NOEXCEPT
Definition json.h:336
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Definition shared_ptr.h:414
fl::flat_map< fl::string, fl::shared_ptr< json_value >, fl::StringFastLess > json_object
Definition types.h:34

References json(), FL_NOEXCEPT, fl::make_shared(), mValue, and value().

Referenced by AutoResearchRemoteControl::findConnectedPinsImpl(), fl::WLED::getPlaylistConfig(), fl::WLED::getState(), fl::Rpc::handle(), loop(), fl::detail::makeJsonRpcError(), makeResponse(), anonymous_namespace{AutoResearchRemote.cpp}::measureTightTiming(), fl::Remote::processRpc(), AutoResearchRemoteControl::registerAllMethods(), AutoResearchRemoteControl::registerFunctions(), fl::Remote::reportError(), fl::Remote::reportError(), fl::net::http::HttpStreamTransport::rpc(), fl::net::http::HttpStreamTransport::rpcStream(), AutoResearchRemoteControl::runParallelTestImpl(), AutoResearchRemoteControl::runSingleTestImpl(), fl::Rpc::schema(), fl::ResponseSend::sendFinal(), fl::net::http::HttpStreamTransport::sendHeartbeat(), fl::Remote::sendStreamFinal(), fl::Remote::sendStreamUpdate(), set(), setup(), fl::RpcResult::to_json(), and fl::ScreenMap::toJson().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: