Deserialize JSON string to c# object

后端 未结 6 2101
轻奢々
轻奢々 2020-12-10 01:15

My Application is in Asp.Net MVC3 coded in C#. This is what my requirement is. I want an object which is in the following format.This object should be achieved when I deseri

6条回答
  •  遥遥无期
    2020-12-10 02:03

    solution :

     public Response Get(string jsonData) {
         var json = JsonConvert.DeserializeObject(jsonData);
         var data = StoredProcedure.procedureName(json.Parameter, json.Parameter, json.Parameter, json.Parameter);
         return data;
     }
    

    model:

     public class modelname {
         public long parameter{ get; set; }
         public int parameter{ get; set; }
         public int parameter{ get; set; }
         public string parameter{ get; set; }
     }
    

提交回复
热议问题