Skip to content

Commit 7b9308b

Browse files
committed
Use trim-safe code in LazyJsonConverter.
1 parent dbc650e commit 7b9308b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Elastic.Clients.Elasticsearch/_Shared/Core/LazyJsonConverter.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ public override LazyJson Read(ref Utf8JsonReader reader, Type typeToConvert, Jso
1818
{
1919
InitializeSettings(options);
2020

21-
#pragma warning disable IL2026, IL3050 // The `TypeInfoResolver` for `RequestResponseConverter` knows how to handle `JsonElement`.
22-
return new LazyJson(JsonSerializer.Deserialize<JsonElement>(ref reader, options), _settings!);
23-
#pragma warning restore IL2026, IL3050
21+
return new LazyJson(JsonElement.ParseValue(ref reader), _settings!);
2422
}
2523

2624
private void InitializeSettings(JsonSerializerOptions options)

0 commit comments

Comments
 (0)