c# - How to deserialize JSON to a object with type Interface -


i using asp.net mvc. have model property type interface.

public class testmodel : basemodel {    public(testmodel)    {}    public int status {get;set;}   public itestinterface testinterface {get;set;} } 

i not able desterilize object in controller when passing view json.

 javascriptserializer jsserializer = new javascriptserializer(); list<testmodel> lstmodel = jsserializer.deserialize<list<testmodel>>(strjsondata.tostring()); 

thanks, kron


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -