MCPcopy Create free account
hub / github.com/FastLED/FastLED / toJson

Method toJson

src/platforms/shared/ui/json/audio_internal.cpp.hpp:11–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace fl {
10
11void JsonUiAudioInternal::toJson(fl::json &json) const FL_NOEXCEPT {
12 json.set("name", name());
13 json.set("group", groupName());
14 json.set("type", "audio");
15 json.set("id", id());
16 if (mUrl.isValid()) {
17 json.set("url", mUrl.string());
18 }
19 // Audio data flows one-way (JS -> C++), never echo back to JS.
20 // Echoing would create a feedback loop of growing JSON payloads.
21}
22
23void JsonUiAudioInternal::updateInternal(const fl::json &value) FL_NOEXCEPT {
24 if (value.contains("audioData")) {

Callers

nothing calls this directly

Calls 4

idClass · 0.85
setMethod · 0.45
isValidMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected