以JSON数据解析为.NET对象的最佳方式 [英] Best way to parse JSON data into a .NET object

查看:128
本文介绍了以JSON数据解析为.NET对象的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是解析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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆