以JSON数据解析为.NET对象的最佳方式 [英] Best way to parse JSON data into a .NET object
问题描述
什么是解析JSON数据转换成.NET对象的最佳方式?我想帮助我的codeR朋友,他正试图从一个JSON字符串的一些数据转储到使用ASP.net数据库。是否有任何prebuilt脚本,将做到这一点?
What's the best way to parse JSON data into a .NET object? I am trying to assist a coder friend of mine and he is trying to dump some data from a JSON string into a database using ASP.net. Are there any prebuilt scripts that would make this happen?
在此先感谢任何人的帮助。
Thanks in advance to any help.
推荐答案
.NET Framework 3.5的有<一个href=\"http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx\">JavaScriptSerializer类,可以缓解反序列化。您也可以使用第三方库如 JSON.NET 。
The .NET Framework 3.5 has the JavaScriptSerializer class that can ease the deserialization. You can also use third party libraries like JSON.NET.
这篇关于以JSON数据解析为.NET对象的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!