| 232 | } |
| 233 | |
| 234 | void EchoPlugin::FormatJson(std::string& json_str) { |
| 235 | Json::Value root; |
| 236 | bool success = Json::Reader().parse(json_str, root); |
| 237 | if (success) { |
| 238 | json_str = Json::StyledWriter().write(root); |
| 239 | } else [[unlikely]] { |
| 240 | AIMRT_WARN("Invalid json string, will keep original string."); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | void EchoPlugin::Shutdown() noexcept { |
| 245 | try { |