Friday, January 3, 2014

How to deserialize json data into dynamic object in C#?

Get DynamicJsonConverter code from
https://github.com/tomvdb/coderwall-csharp-wrapper/blob/master/coderwall_api/DynamicJsonConverter.cs

		string JSONdata ="";
                var serializer = new JavaScriptSerializer();
                serializer.RegisterConverters(new[] { new DynamicJsonConverter() });
                dynamic obj = serializer.Deserialize(JSONdata, typeof(object));

No comments:

Post a Comment