1 | #include "mtx/responses/turn_server.hpp" |
---|---|
2 | |
3 | #include <nlohmann/json.hpp> |
4 | |
5 | namespace mtx::responses { |
6 | |
7 | void |
8 | from_json(const nlohmann::json &obj, TurnServer &turnServer) |
9 | { |
10 | turnServer.username = obj.at(key: "username").get<std::string>(); |
11 | turnServer.password = obj.at(key: "password").get<std::string>(); |
12 | turnServer.uris = obj.at(key: "uris").get<std::vector<std::string>>(); |
13 | turnServer.ttl = obj.at(key: "ttl").get<uint32_t>(); |
14 | } |
15 | } |
16 |