How can I parse a JSON string using ASP.NET?

前端 未结 3 1504
暖寄归人
暖寄归人 2020-12-18 15:15

I am using Sendgrid API to send and retrieve statistics of mail sent. I want to store the response of API in database.

protected void btnBounces_Click(object         


        
3条回答
  •  天涯浪人
    2020-12-18 15:42

    If you do not want to create a Movie class, you can use System.Web.Script.Serialization to parse and get a dynamic object.

    JavaScriptSerializer js = new JavaScriptSerializer();
    dynamic movie = js.Deserialize(json);
    

提交回复
热议问题