It is any class in .NET 4.0 to serialize/de-serialize JSON data?? I find some 3rd party like JSON.NET, but want to know it is exist in .NET 4.0.
I find in MSDN, it introduce using Data Contracts to do, but it is for WCF, not WinForm/WPF
It is any class in .NET 4.0 to serialize/de-serialize JSON data?? I find some 3rd party like JSON.NET, but want to know it is exist in .NET 4.0.
I find in MSDN, it introduce using Data Contracts to do, but it is for WCF, not WinForm/WPF
There's the JavaScriptSerializer class (although you will need to reference the System.Web.Extensions
assembly the class works perfectly fine in WinForms/WPF applications). Also even if the DataContractJsonSerializer class was designed for WCF it works fine in client applications.
You can use the DataContractJsonSerializer class anywhere you want, it is just a .net class and is not limited to WCF. More info on how to use it here and here.