October 2009 Blog Posts

Using JSON.Net to eval json into a dynamic variable in C#

So I thought this would be possible and finally decided to give it a shot in 2010 Beta 2. It turns a bunch of JSON into an ExpandoObject using JSON.Net. Needs cleaning up but not too bad.         [TestMethod]         public void DeserializeTestObjectToDynamic(){             TestObject testObject = new TestObject() {                 FirstName = "Peter",                 LastName = "Goodman",                 DateOfBirth = new DateTime(1979, 2, 3),                 Child = new TestChildObject {                     Line1 =...