Skip to content

Conversation

@flobernd
Copy link
Member

This PR updates the Elastic.Transport library and adjusts the DefaultRequestResponseSerializer and DefaultSourceSerializer implementations accordingly.

There are now multiple additional extension methods available in the Elastic.Transport.Extensions namespace which can be used for easiy (de-)serialization without having to know details about the underlaying serializer implementation:

  • Deserialize(Serializer, JsonElement, Type, MemoryStreamFactory)
  • Deserialize(Serializer, JsonNode, Type, MemoryStreamFactory)
  • Deserialize(Serializer, ReadOnlySpan<Byte>, Type, MemoryStreamFactory)
  • Deserialize(Serializer, ReadOnlySpan<Char>, Type, MemoryStreamFactory)
  • Deserialize(Serializer, Utf8JsonReader&, Type, MemoryStreamFactory)
  • Deserialize<T>(Serializer, JsonElement, MemoryStreamFactory)
  • Deserialize<T>(Serializer, JsonNode, MemoryStreamFactory)
  • Deserialize<T>(Serializer, ReadOnlySpan<Byte>, MemoryStreamFactory)
  • Deserialize<T>(Serializer, ReadOnlySpan<Char>, MemoryStreamFactory)
  • Deserialize<T>(Serializer, Utf8JsonReader&, MemoryStreamFactory)
  • Serialize(Serializer, Object, Type, Utf8JsonWriter, MemoryStreamFactory, SerializationFormatting)
  • Serialize(Serializer, Object, Type, Utf8JsonWriter, SerializationFormatting)
  • Serialize<T>(Serializer, T, Utf8JsonWriter, MemoryStreamFactory, SerializationFormatting)
  • Serialize<T>(Serializer, T, Utf8JsonWriter, SerializationFormatting)
  • SerializeToBytes(Serializer, Object, Type, MemoryStreamFactory, SerializationFormatting)
  • SerializeToBytes(Serializer, Object, Type, SerializationFormatting)
  • SerializeToString(Serializer, Object, Type, MemoryStreamFactory, SerializationFormatting)
  • SerializeToString(Serializer, Object, Type, SerializationFormatting)
  • SerializeToBytes<T>(Serializer, T, MemoryStreamFactory, SerializationFormatting)
  • SerializeToString<T>(Serializer, T, MemoryStreamFactory, SerializationFormatting)

Related to #8359

@flobernd flobernd merged commit 824a6b8 into main Oct 16, 2024
25 of 26 checks passed
@flobernd flobernd deleted the improve-serializer branch October 16, 2024 12:39
github-actions bot pushed a commit that referenced this pull request Oct 16, 2024
github-actions bot pushed a commit that referenced this pull request Oct 16, 2024
flobernd added a commit that referenced this pull request Oct 16, 2024
flobernd added a commit that referenced this pull request Oct 16, 2024
flobernd added a commit that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.x Relates to a 8.x client version Area: Client Category: Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant