Format .NET projects with csharpier
This commit is contained in:
@@ -10,7 +10,8 @@ public class DateOnlyConverter : JsonConverter<DateOnly>
|
||||
public override DateOnly Read(
|
||||
ref Utf8JsonReader reader,
|
||||
Type typeToConvert,
|
||||
JsonSerializerOptions options)
|
||||
JsonSerializerOptions options
|
||||
)
|
||||
{
|
||||
var value = reader.GetString();
|
||||
return DateOnly.ParseExact(value!, serializationFormat);
|
||||
@@ -19,6 +20,6 @@ public class DateOnlyConverter : JsonConverter<DateOnly>
|
||||
public override void Write(
|
||||
Utf8JsonWriter writer,
|
||||
DateOnly value,
|
||||
JsonSerializerOptions options)
|
||||
=> writer.WriteStringValue(value.ToString(serializationFormat));
|
||||
}
|
||||
JsonSerializerOptions options
|
||||
) => writer.WriteStringValue(value.ToString(serializationFormat));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user