using System.Collections.Generic;
using System.Security.Claims;
public string name {get;set;}
[Newtonsoft.Json.JsonProperty("a.abool", DefaultValueHandling=Newtonsoft.Json.DefaultValueHandling.Populate)]
public bool abool{get;set;}
[Newtonsoft.Json.JsonProperty("b.abool", DefaultValueHandling=Newtonsoft.Json.DefaultValueHandling.Populate)]
public bool bbool{get;set;}
public bool ShouldSerializeabool() {
public bool ShouldSerializebbool() {
public static void Main()
var a = new CC {name = "a", abool = true, bbool = false};
var b = new CC {name = "b", abool = true, bbool = false};
Newtonsoft.Json.JsonSerializerSettings js = new Newtonsoft.Json.JsonSerializerSettings();
js.DefaultValueHandling = Newtonsoft.Json.DefaultValueHandling.Ignore;
var s1 = Newtonsoft.Json.JsonConvert.SerializeObject(a, Newtonsoft.Json.Formatting.None, js);
var s2 = Newtonsoft.Json.JsonConvert.SerializeObject(b, Newtonsoft.Json.Formatting.None, js);