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
Rename ErrorSerializerContext and update related references (#164)
Renamed `ErrorSerializerContext` to
`ElasticsearchTransportSerializerContext` for improved clarity and
consistency. Updated all references across serialization logic and tests
to align with the new context name. This ensures correct deserialization
behavior and avoids potential conflicts with outdated naming.
Copy file name to clipboardExpand all lines: src/Elastic.Transport/Components/Serialization/Converters/DynamicDictionaryConverter.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ public override DynamicDictionary Read(ref Utf8JsonReader reader, Type typeToCon
19
19
{
20
20
if(reader.TokenType==JsonTokenType.StartArray)
21
21
{
22
-
vararray=JsonSerializer.Deserialize<object[]>(refreader,ErrorSerializerContext.Default.ObjectArray);// TODO: Test! This might not work without adding `object[]` to `ErrorSerializationContext`
22
+
vararray=JsonSerializer.Deserialize<object[]>(refreader,ElasticsearchTransportSerializerContext.Default.ObjectArray);// TODO: Test! This might not work without adding `object[]` to `ErrorSerializationContext`
vardict=JsonSerializer.Deserialize<Dictionary<string,object>>(refreader,ErrorSerializerContext.Default.DictionaryStringObject);// TODO: Test! This might not work without adding `Dictionary<string, object>` to `ErrorSerializationContext`
30
+
vardict=JsonSerializer.Deserialize<Dictionary<string,object>>(refreader,ElasticsearchTransportSerializerContext.Default.DictionaryStringObject);// TODO: Test! This might not work without adding `Dictionary<string, object>` to `ErrorSerializationContext`
JsonSerializer.Serialize(writer,kv.Value,ErrorSerializerContext.Default.Object);// TODO: Test! This might not work without adding `KeyValuePair<string, object>` to `ErrorSerializationContext`
75
+
JsonSerializer.Serialize(writer,kv.Value,ElasticsearchTransportSerializerContext.Default.Object);// TODO: Test! This might not work without adding `KeyValuePair<string, object>` to `ErrorSerializationContext`
@@ -73,49 +73,49 @@ public override Error Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSe
73
73
74
74
if(reader.ValueTextEquals("headers"))
75
75
{
76
-
varvalue=JsonSerializer.Deserialize<IReadOnlyDictionary<string,string>>(refreader,ErrorSerializerContext.Default.IReadOnlyDictionaryStringString);// TODO: Test! This might not work without adding `IReadOnlyDictionary<string, string>` to `ErrorSerializationContext`
76
+
varvalue=JsonSerializer.Deserialize<IReadOnlyDictionary<string,string>>(refreader,ElasticsearchTransportSerializerContext.Default.IReadOnlyDictionaryStringString);// TODO: Test! This might not work without adding `IReadOnlyDictionary<string, string>` to `ErrorSerializationContext`
0 commit comments