How to use ShouldSerialize[MemberName]() method for a property of type Object?
问题 I have tried to prevent the property of type object with no new values assigned to its properties using ShouldSerialize Method in Newtonsoft.Json. But I dont know how to implement it, so please help me to solve this... Here is the sample code public class Sample1 { public String name{get;set;} public int Id{get;set;}; } And this is my Class containing the above class as one of its properties public class Container { public String Cname{get;set;} public Sample1 Sample{get;set;}; public bool