| 106 | } |
| 107 | |
| 108 | json_t* dataToJson() override { |
| 109 | json_t* rootJ = json_object(); |
| 110 | |
| 111 | json_t* ccsJ = json_array(); |
| 112 | for (int id = 0; id < 16; id++) { |
| 113 | json_array_append_new(ccsJ, json_integer(learnedCcs[id])); |
| 114 | } |
| 115 | json_object_set_new(rootJ, "ccs", ccsJ); |
| 116 | |
| 117 | json_object_set_new(rootJ, "midi", midiOutput.toJson()); |
| 118 | return rootJ; |
| 119 | } |
| 120 | |
| 121 | void dataFromJson(json_t* rootJ) override { |
| 122 | json_t* ccsJ = json_object_get(rootJ, "ccs"); |