| 54 | } |
| 55 | |
| 56 | QByteArray ApplicationMessage::serialize() |
| 57 | { |
| 58 | QJsonObject root; |
| 59 | root.insert("command", command); |
| 60 | QJsonObject outArgs; |
| 61 | for (auto iter = args.constBegin(); iter != args.constEnd(); iter++) { |
| 62 | outArgs.insert(iter.key(), iter.value()); |
| 63 | } |
| 64 | root.insert("args", outArgs); |
| 65 | |
| 66 | return Json::toText(root); |
| 67 | } |