using System.Text.Json;
using System.Text.Json.Serialization;

public sealed class SepsisBundleComplianceStatusJsonConverter : JsonConverter<SepsisBundleComplianceStatus>
{
    public override SepsisBundleComplianceStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
        => DbStringEnumJson.Read(ref reader, SepsisBundleComplianceStatusExtensions.FromDbString);

    public override void Write(Utf8JsonWriter writer, SepsisBundleComplianceStatus value, JsonSerializerOptions options)
        => writer.WriteStringValue(value.ToDbString());
}
