Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.48 KB

client-concepts.asciidoc

File metadata and controls

26 lines (16 loc) · 1.48 KB

Client concepts

The .NET client for {es} maps closely to the original {es} API. All requests and responses are exposed through types, making it ideal for getting up and running quickly.

Serialization

By default, the .NET client for {es} uses the Microsoft System.Text.Json library for serialization. The client understands how to serialize and deserialize the request and response types correctly. It also handles (de)serialization of user POCO types representing documents read or written to {es}.

The client has two distinct serialization responsibilities - serialization of the types owned by the Elastic.Clients.Elasticsearch library and serialization of source documents, modeled in application code. The first responsibility is entirely internal; the second is configurable.

Source serialization

Source serialization refers to the process of (de)serializing POCO types in consumer applications as source documents indexed and retrieved from {es}. A source serializer implementation handles serialization, with the default implementation using the System.Text.Json library. As a result, you may use System.Text.Json attributes and converters to control the serialization behavior.