Elastic.Clients.Elasticsearch 8.x (custom) serialization

I would like to do something like we have in Netwonsoft Json:

options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore

And also have in System.Text.Json:

JsonSerializerOptions options = new()
    ReferenceHandler = ReferenceHandler.IgnoreCycles

But because there is almost not documentation for the newest 8.x version I cannot get it to work. And I didn't find any examples of how to use or instantiate the SourceSerializerFactory.

Thanks in advance!

@stevejgordon Is there any possibility for the above?

Also created a GitHub ticket now

Released :+1:

[FEATURE] Support for custom JsonSerializerOptions · Issue #7238 · elastic/elasticsearch-net (github.com)