Skip to content

TimeSpan serialization bug #34

Description

@StuartWilloughby

Nasty silent bug this one. The default resolver incorrectly handles the TimeSpan type.

To reproduce:

var timeSpan1 = TimeSpan.Parse("00:03:14.008615");
byte[] bytes = JsonSerializer.Serialize(timeSpan1);
var timeSpan2 = JsonSerializer.Deserialize<TimeSpan>(bytes);

timeSpan1 = "00:03:14.008615"
timeSpan2 = "00:03:14.8615"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions