Switch WindowStateAfterStartJsonConverter from 'JsonConverter' to 'JsonConverter<T>'
MODIFY
WalletWasabi.Fluent/Converters/WindowStateAfterStartJsonConverter.cs
WalletWasabi.Fluent/Converters/WindowStateAfterStartJsonConverter.cs
@@ -3,16 +3,10 @@ using Newtonsoft.Json;
namespace WalletWasabi.Fluent.Converters;
-public class WindowStateAfterStartJsonConverter : JsonConverter
+public class WindowStateAfterStartJsonConverter : JsonConverter<string>
{
/// <inheritdoc />
- public override bool CanConvert(Type objectType)
- {
- return objectType == typeof(string);
- }
-
- /// <inheritdoc />
- public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
+ public override string? ReadJson(JsonReader reader, Type objectType, string? existingValue, bool hasExistingValue, JsonSerializer serializer)
{
try
{
@@ -33,7 +27,7 @@ public class WindowStateAfterStartJsonConverter : JsonConverter
}
/// <inheritdoc />
- public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
+ public override void WriteJson(JsonWriter writer, string? value, JsonSerializer serializer)
{
writer.WriteValue(value);
}

Switch WindowStateAfterStartJsonConverter from 'JsonConverter' to 'JsonConverter<T>'