MCPcopy Create free account
hub / github.com/VCVRack/Befaco / dataToJson

Method dataToJson

src/MidiThing.cpp:359–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357
358
359 json_t* dataToJson() override {
360 json_t* rootJ = json_object();
361 json_object_set_new(rootJ, "midiOutput", midiOut.toJson());
362 json_object_set_new(rootJ, "inputQueue", inputQueue.toJson());
363 json_object_set_new(rootJ, "updateRateIdx", json_integer(updateRateIdx));
364
365 for (int c = 0; c < NUM_INPUTS; ++c) {
366 json_object_set_new(rootJ, string::f("portMode%d", c).c_str(), json_integer(portModes[c]));
367 }
368
369 return rootJ;
370 }
371
372 void dataFromJson(json_t* rootJ) override {
373 json_t* midiOutputJ = json_object_get(rootJ, "midiOutput");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected