How do I deserialize TimeOnly (c#) from json?

Viewed 37

I am currently doing the following:

var json = JsonConvert.SerializeObject(product);
return JsonConvert.DeserializeObject<Dictionary<string, string>>(json);

The object product has objects of type TimeOnly. The serialize part works but the deserialize causes it to crash. Any ideas?

Thanks in advance.

1 Answers
Related