You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move SystemTextJsonSerializer from Elastic.Clients.Elasticsearch to Elastic.Transport as a public base serializer.
Apply the required modifications to strip IElasticsearchClientSettings.
In Elastic.Transport, make LowLevelRequestResponseSerializer derive from SystemTextJsonSerializer.
In Elastic.Clients.Elasticsearch, make DefaultSourceSerializer derive from SystemTextJsonSerializer.
Intention
This is a predecessor step of moving the static SourceSerialization helper class from Elastic.Clients.Elasticsearch to Elastic.Transport and renaming it to SerializerHelper.
This class should serve as a user-facing interface for (de-)serialization as an alternative to directly calling the methods defined in Serializer.
The class should primarily provide System.Text.Json based overloads (like using Utf8JsonReader, JsonNode, etc. instead of Stream) and internally shortcut these overloads to directly use JsonSerializer, if the given Serializer implementation derives from SystemTextJsonSerializer.
Why?
This makes it easier for our users to further convert object/JsonElement values into specialized types without having to use complicated workarounds.
It as well allows use to use the shortcut serialization path in high level integrations in a standard way.
The text was updated successfully, but these errors were encountered:
Proposal
Move
SystemTextJsonSerializer
fromElastic.Clients.Elasticsearch
toElastic.Transport
as apublic
base serializer.Apply the required modifications to strip
IElasticsearchClientSettings
.In
Elastic.Transport
, makeLowLevelRequestResponseSerializer
derive fromSystemTextJsonSerializer
.In
Elastic.Clients.Elasticsearch
, makeDefaultSourceSerializer
derive fromSystemTextJsonSerializer
.Intention
This is a predecessor step of moving the static
SourceSerialization
helper class fromElastic.Clients.Elasticsearch
toElastic.Transport
and renaming it toSerializerHelper
.This class should serve as a user-facing interface for (de-)serialization as an alternative to directly calling the methods defined in
Serializer
.The class should primarily provide
System.Text.Json
based overloads (like usingUtf8JsonReader
,JsonNode
, etc. instead ofStream
) and internally shortcut these overloads to directly useJsonSerializer
, if the givenSerializer
implementation derives fromSystemTextJsonSerializer
.Why?
This makes it easier for our users to further convert
object/JsonElement
values into specialized types without having to use complicated workarounds.It as well allows use to use the shortcut serialization path in high level integrations in a standard way.
The text was updated successfully, but these errors were encountered: