109 uint32_t codepage = ISerializable::getCodepage();
110 json::JSONBuilder builder(codepage);
112 vector<json::utility::jsonObject> children;
114 for (
const auto& i : items)
116 json::utility::jsonObject child;
117 json::JSONBuilder structure = i->getStructure();
119 const string& itemText = get<string>(structure[
"itemText"]);
120 const string& itemType = get<string>(structure[
"itemType"]);
122 child.data.push_back({
"itemText"s, itemText });
123 child.data.push_back({
"itemType"s, itemType });
125 if (structure.contains(
"functionName", json::utility::variantTypeEnum::jString))
127 child.data.push_back({
"functionName"s, get<string>(structure[
"functionName"]) });
128 child.data.push_back({
"moduleName"s, get<string>(structure[
"moduleName"]) });
133 child.data.push_back({
"popupId"s, get<uint64_t>(structure[
"popupId"]) });
136 json::utility::appendArray(move(child), children);
141 append(
"menuId"s,
reinterpret_cast<uint64_t
>(handle)).
142 append(
"items"s, move(children));