Converting list of objects to json array

前端 未结 3 1812
余生分开走
余生分开走 2021-01-02 07:31

I have a List of class objects that have email address and status data members. I am trying to convert these to a json, making sure to have the \"operations\" word on the ar

3条回答
  •  再見小時候
    2021-01-02 08:19

    You can try with something like this:

    using System.Web.Script.Serialization;
    var jsonSerialiser = new JavaScriptSerializer();
    var json = jsonSerialiser.Serialize(data);
    

提交回复
热议问题