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
Description of the problem including expected versus actual behavior:
Unlike SerializeAsync<T>, Serialize<T> creates a new Utf8JsonWriter, which has its own JsonWriterOptions, which ignore JsonSerializerOptions. If SerializationFormatting.Indented, JsonWriterOptions still defaults to Indented = false.
Steps to reproduce:
Call DefaultSourceSerializer.Serialize<T> with SerializationFormatting.Indented
Elastic.Clients.Elasticsearch version: 8.11.0
Elasticsearch version: -
.NET runtime version: 8.0.100
Operating system version: -
Description of the problem including expected versus actual behavior:
Unlike
SerializeAsync<T>
,Serialize<T>
creates a newUtf8JsonWriter
, which has its ownJsonWriterOptions
, which ignoreJsonSerializerOptions
. IfSerializationFormatting.Indented
,JsonWriterOptions
still defaults toIndented = false
.Steps to reproduce:
DefaultSourceSerializer.Serialize<T>
withSerializationFormatting.Indented
Expected behavior
JSON formatting follows specified
SerializationFormatting
.The text was updated successfully, but these errors were encountered: