Skip to content

Commit 5d68556

Browse files
zrckrKrzyhau
authored andcommitted
correctly serialize decimal total seconds of TimeSpan into a json number
1 parent 71d858f commit 5d68556

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Core/Helpers/Json/CustomConverters/TimeSpanJsonConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public override void Write(
1818
TimeSpan timespan,
1919
JsonSerializerOptions options)
2020
{
21-
writer.WriteRawValue($"{timespan.TotalSeconds}");
21+
writer.WriteNumberValue((decimal)timespan.TotalSeconds);
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)