Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve serializer #8391

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Improve serializer #8391

merged 1 commit into from
Oct 16, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant