Specifying default value for a property in relation to other property in Json.NET
问题 I am wondering if there is a way to set default value for a property in relation to other property of the same class in Json.NET e.g like this: public class JsonsoftExample { [JsonProperty(Required = Required.Always)] public DateTime Start { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] [DefaultValue(Start.AddHours(1))] public DateTime End { get; set; } } What I am trying to accomplish here is to populate End with DateTime value that is one hour later than