json notifications

This commit is contained in:
badaix 2015-09-01 22:18:45 +02:00
parent f546738d75
commit 3a0b856afe
3 changed files with 36 additions and 9 deletions

View file

@ -117,6 +117,21 @@ bool JsonRequest::isParam(size_t idx, const std::string& param)
}
Json JsonNotification::getJson(const std::string& method, Json data)
{
Json notification = {
{"jsonrpc", "2.0"},
{"method", method},
{"params", {
{"data", data}
}}
};
return notification;
}
/*
if ((method == "get") || (method == "set"))