using System.Text.Json;
using System.Text.Json.Serialization;
namespace MultiversalDiplomacy.Model;
///
/// Serializes a as its combined designation.
///
internal class SeasonJsonConverter : JsonConverter
{
public override Season Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
=> new(reader.GetString()!);
public override void Write(Utf8JsonWriter writer, Season value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.Key);
}