0

我正在将 ElasticSearch 集成到我们的一个网站中。迁移产品时,我经常收到此错误。

self referencing loop detected for type 'mytype'

我已经阅读了它,您可以将JsonSerializerSettings的属性ReferenceLoopHandling设置为ReferenceLoopHandling.Ignore。有没有办法用 NEST 做到这一点?

//干杯

4

1 回答 1

0

Nest 打开它使用的序列化程序设置

client.ModifyJsonSerializationSettings(s=> {
    //do with JsonSerializerSettings s here what you want
});

这使您还可以注册自定义转换器等。

于 2013-07-25T08:49:47.590 回答