public override void Write(System.Text.Json.Utf8JsonWriter writer, Maybe <T> value, System.Text.Json.JsonSerializerOptions options) { if (value.HasValue) { System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); } else { writer.WriteNullValue(); } }
public override void Write(System.Text.Json.Utf8JsonWriter Utf8JsonWriter, System.Text.Json.JsonElement JsonElement, System.Text.Json.JsonSerializerOptions JsonSerializerOptions) { if (JsonElement.ValueKind != System.Text.Json.JsonValueKind.Undefined) { JsonElement.WriteTo(Utf8JsonWriter); } else { Utf8JsonWriter.WriteNullValue(); } }