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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -