Skip to content

Commit

Permalink
explicitly make a json object instead of array
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Mar 3, 2019
1 parent 5cc20f4 commit 7a633af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Common/ESDConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ void ESDConnectionManager::ShowOKForContext(const std::string& inContext) {
}

void ESDConnectionManager::LogMessage(const std::string& message) {
json payload;
payload["message"] = message;
const json jsonObject{{kESDSDKCommonEvent, kESDSDKEventLogMessage},
{kESDSDKCommonPayload, {"message", message}}};
{kESDSDKCommonPayload, payload}};
websocketpp::lib::error_code ec;
mWebsocket.send(
mConnectionHandle, jsonObject.dump(), websocketpp::frame::opcode::text, ec);
Expand Down

0 comments on commit 7a633af

Please sign in to comment.