Im looking to upgrade our project to SignalR 2.0 from 1.0. One issue I have come across is that IJsonSerializer seems to have been removed in 2.0. I was previously using it to change the ContractResolver and have property names in camel case. (see https://github.com/SignalR/SignalR/issues/500#issuecomment-7453751 and code below)
Is there any way to replicate this functionality in 2.0 without the IJsonSerializer interface?
var settings = new JsonSerializerSettings();
settings.ContractResolver = new SignalRContractResolver();
var serializer = new JsonNetSerializer(settings);
GlobalHost.DependencyResolver.Register(typeof(IJsonSerializer), ()=>serializer);
This was a bug with the RC which has now been fixed. See https://github.com/SignalR/SignalR/issues/500#issuecomment-25580534
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With