How to import JsonConvert in C# application?

后端 未结 9 1385
栀梦
栀梦 2020-12-03 02:33

I created a C# library project. The project has this line in one class:

JsonConvert.SerializeObject(objectList);

I\'m getting error saying

9条回答
  •  再見小時候
    2020-12-03 02:44

    right click on the project and select Manage NuGet Packages.. In that select Json.NET and install

    After installation,

    use the following namespace

    using Newtonsoft.Json;
    

    then use the following to deserialize

    JsonConvert.DeserializeObject
    

提交回复
热议问题