wcf - Converting Json to .NET Object collection -
as part of wcf service, convert datatable json. on client side, want able convert json response .net collection. want able keep dynmaic, , bind data grid. trying figure out best way this. jay
define collection , class properties match json data - use javascriptserializer class. bind grid collection:
class acollection { public ienumerable<someclass> someclasslist { get; set; } } class someclass { public string field { get; set; } } javascriptserializer jsserializer = new javascriptserializer(); acollection list = jsserializer.deserialize<acollection>(jsonstring);
Comments
Post a Comment