Skip to content

Feature request to publish JsonNetSerializer #8343

Open
@deinman

Description

@deinman

Is your feature request related to a problem? Please describe.

Using latest Elastic.Clients.Elasticsearch (8.15.6) and trying to serialize with the JsonNetSerializer doesn't work as indicated in the test code. You've got these great examples in the tests:

public void DefaultJsonNetSerializer()
{
var pool = new SingleNodePool(new Uri("http://localhost:9200"));
var connectionSettings =
new ElasticsearchClientSettings(pool, sourceSerializer: JsonNetSerializer.Default);
var client = new ElasticsearchClient(connectionSettings);
}
/**
* `JsonNetSerializer.Default` is just syntactic sugar for passing a delegate like
*/
public void DefaultJsonNetSerializerUnsugared()
{
var pool = new SingleNodePool(new Uri("http://localhost:9200"));
var connectionSettings = new ElasticsearchClientSettings(
pool,
sourceSerializer: (builtin, settings) => new JsonNetSerializer(builtin, settings));
var client = new ElasticsearchClient(connectionSettings);
}

But it looks like you're not shipping the updated JsonNetSerializer. The NEST 7.15 version is available in NuGet, but at some point there were updates made with Elastic.Clients.Elasticsearch.JsonNetSerializer that aren't exposed anywhere. And I can't work out a way to use the 7.15 version with the Elastic.Clients.ElasticSearch 8.15.* versions.

Describe the solution you'd like

Please publish the Elastic.Clients.Elasticsearch.JsonNetSerializer.

Describe alternatives you've considered

My alternative seems to be to fork the Elastic.Clients.Elasticsearch.JsonNetSerializer code and reference that internally, but that's a lot of extra overhead given your published test suite utilizes the Elastic.Clients.Elasticsearch.JsonNetSerializer code.

Additional context

I've setup a repo to demonstrate the issue here: https://github.com/deinman/demoissueelastic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions