Conditional serialization using Csharp 31 Mar 2015 • C# JSON JSON.NET Serialization Sometimes you need to serialize different attributes according to conditions and properties of your own object, you