diff --git a/TwitchChatVotingProxy/OverlayServer/OverlayServer.cs b/TwitchChatVotingProxy/OverlayServer/OverlayServer.cs index dc2b548e1..2a3ab52a9 100644 --- a/TwitchChatVotingProxy/OverlayServer/OverlayServer.cs +++ b/TwitchChatVotingProxy/OverlayServer/OverlayServer.cs @@ -1,5 +1,6 @@ using Fleck; using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; using Serilog; // TODO: fix voting mode @@ -126,7 +127,9 @@ private void Request(string request, List voteOptions) msg.TotalVotes = 0; voteOptions.ForEach(_ => msg.TotalVotes += _.Votes); // Send the message to all clients - Broadcast(JsonConvert.SerializeObject(msg)); + Broadcast(JsonConvert.SerializeObject(msg, new JsonSerializerSettings { + ContractResolver = new CamelCasePropertyNamesContractResolver() + })); } } } diff --git a/TwitchChatVotingProxy/OverlayServer/OverlayVoteOption.cs b/TwitchChatVotingProxy/OverlayServer/OverlayVoteOption.cs index 758f796e7..b634c70c4 100644 --- a/TwitchChatVotingProxy/OverlayServer/OverlayVoteOption.cs +++ b/TwitchChatVotingProxy/OverlayServer/OverlayVoteOption.cs @@ -2,7 +2,7 @@ { /// /// Represents how the vote options are being sent to the client after - /// JSON serializing them. + /// JSON serializing them with properties converted to lower case after the fact. /// class OverlayVoteOption {