comparison irccdctl/cli.cpp @ 649:4a13a016ea4f

Irccd: use new json_util::parser class
author David Demelier <markand@malikania.fr>
date Mon, 26 Mar 2018 20:30:15 +0200
parents 7e2d0739f37c
children 95ac3ace1610
comparison
equal deleted inserted replaced
648:8a9cac75608f 649:4a13a016ea4f
34 { 34 {
35 ctl.recv([&ctl, req, handler, this] (auto code, auto message) { 35 ctl.recv([&ctl, req, handler, this] (auto code, auto message) {
36 if (code) 36 if (code)
37 throw boost::system::system_error(code); 37 throw boost::system::system_error(code);
38 38
39 const auto c = json_util::get_string(message, "/command"_json_pointer); 39 const auto c = json_util::parser(message).get<std::string>("command");
40 40
41 if (!c) { 41 if (!c) {
42 recv_response(ctl, std::move(req), std::move(handler)); 42 recv_response(ctl, std::move(req), std::move(handler));
43 return; 43 return;
44 } 44 }