SignalR 2.0.0 beta2 IJsonSerializer可扩展性 [英] SignalR 2.0.0 beta2 IJsonSerializer extensibility
问题描述
我想添加一些自定义序列化逻辑,以便转换后的json包含驼峰式案例属性.
I want to add some custom serialization logic so that the converted json contains camel case properties.
由于这个原因,我尝试用在此链接中找到的iIsonSerializer替换默认的IJsonSerializer:
For that reason i tried to replace the default IJsonSerializer with one the i found in this link:
https://github.com/SignalR/SignalR/issues/500
但是似乎有问题.更具体地说,在任何signalR程序集中都不存在JsonNetSerializer
和IJsonSerializer
类.在这方面,最新版本的signalR是否发生任何变化?
However there seems to be a problem. More specifically, the JsonNetSerializer
and IJsonSerializer
classes do not exist in any of the signalR assemblies. Is there any change that happened to the recent version of signalR in that respect?
推荐答案
在SignalR 2.0中,您无法替换JsonSerializer,不再有IJsonSerializer抽象.始终是JSON.NET.
In SignalR 2.0 you can't replace the JsonSerializer, there's no more IJsonSerializer abstraction. It's always JSON.NET.
这篇关于SignalR 2.0.0 beta2 IJsonSerializer可扩展性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!