14 lines
503 B
C#
14 lines
503 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace MultiversalDiplomacy.Model;
|
|
|
|
internal class TimelineFactoryJsonConverter : JsonConverter<TimelineFactory>
|
|
{
|
|
public override TimelineFactory? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
|
=> new(reader.GetInt32());
|
|
|
|
public override void Write(Utf8JsonWriter writer, TimelineFactory value, JsonSerializerOptions options)
|
|
=> writer.WriteNumberValue(value.nextTimeline);
|
|
}
|