简体   繁体   English

在NEST2上删除了INestSerializer

[英]INestSerializer removed on NEST2

Looks like NEST2 INestSerializer has been removed but I can't find the substitute for it in the current source code. 看起来NEST2 INestSerializer已被删除,但在当前源代码中找不到它的替代品。

The breaking changes page lists it under the removed classes 重大更改页面将其列出在已删除的类下

What's the new class to use? 什么是新课程?

The equivalent in Nest 2.x is IElasticsearchSerializer with the default implementation being JsonNetSerializer , a json serializer that uses Json.Net under the covers. Nest 2.x中的等效项是IElasticsearchSerializer ,默认实现是JsonNetSerializer ,这是一个在JsonNetSerializer使用Json.Net的json序列化器。

In cases where you want to add Contract Converters (for custom type serialization/deserialization) or to define custom property mapping (outside of using attributes, automapping, fluent mapping or mapping visitor), then you'll probably want to derive from JsonNetSerializer . 如果要添加Contract Converters(用于自定义类型序列化/反序列化)或定义自定义属性映射(除了使用属性,自动映射,流利的映射或映射访客之外),则可能需要从JsonNetSerializer派生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM