Serialize instance of a class deriving from DynamicObject class
问题 I have a class that derives from DynamicObject class. On calling JsonConvert.SertializeObject, none of the dynamic properties are serialized. Class is defined as, public class Component : DynamicObject { // The inner dictionary. public Dictionary<string, object> dictionary = new Dictionary<string, object>(); [JsonProperty(PropertyName = "id")] public string Id { get; set; } // If you try to get a value of a property // not defined in the class, this method is called. public override bool