public void TestFlatten() { var json = JsonConvert.SerializeObject(new Person { Name = "abhay", Contacts = new List <Contact> { new Contact { Order = 1, Value = "860904" } } }); var util = new JsonExtensions(); var keyValues = util.Flatten(json); var str = util.Unflatten(keyValues); Assert.AreEqual(str, json); }