mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 14:06:14 +02:00
json notifications
This commit is contained in:
parent
f546738d75
commit
3a0b856afe
3 changed files with 36 additions and 9 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue