What should I use to serialize a DataTable to JSON in ASP.NET 2.0?

橙三吉。 提交于 2019-12-05 08:51:52
tedski

I used this question's first answer to solve my problem: DataTable to JSON

I downloaded the AJAX Extensions 1.0 Library and included "System.Web.Extensions.dll" with my project. http://www.microsoft.com/download/en/details.aspx?id=883

JavaScriptSerializer now works.

The Jayrock Library works with all versions of .Net all the way down to 1.x. You'll have to build it yourself for 2.0, but that's no big deal.

I've used it for the past few months. Nice and simple Json serialization and deserialization.

Easy (but not elegant) solution is to create a shim in .NET 4 that will call your legacy application via HTTP POST or SOAP and convert result in JSON format with NewtonSoft.Json which works OK on .NET 4.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!