parse Json text to C# object in asp mvc 4

前端 未结 3 1667
情深已故
情深已故 2021-02-19 22:42

I have a huge amount of customized attributes I want to save them in the DataBase, I was confused of how to store them in the database, i thought of storing them as a string sep

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 23:10

    Many people use Json.net for serialization

    var log  = JsonConvert.DeserializeObject(logJson)
    

    and the other direction

      var logJson = JsonConvert.SerializeObject(log);
    

提交回复
热议问题