SignalR 2.0.0 beta2 IJsonSerializer可扩展性 [英] SignalR 2.0.0 beta2 IJsonSerializer extensibility

查看:103
本文介绍了SignalR 2.0.0 beta2 IJsonSerializer可扩展性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加一些自定义序列化逻辑,以便转换后的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程序集中都不存在JsonNetSerializerIJsonSerializer类.在这方面,最新版本的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆