如何在C#中反序列化JSON值 [英] How to deserialize JSON values in C#

查看:87
本文介绍了如何在C#中反序列化JSON值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在开发一个程序,在该程序中我需要获取一些从URL获得的值.
JSON如下:

{"country":{"name":"India","State":"Raj":Count:239},"Population":25487}

现在我想使用C#来获取Count和Population的值.

我试过使用JavaScriptSerializer();但是问题在于它的响应时间要慢得多.

请为我建议一种从此JSON字符串中获取值的方法.

谢谢

Hello I am working on a program in which i need to fetch some values obtained from an URL.
The JSON is as given:

{"country":{"name":"India","State":"Raj": Count :239}, "Population": 25487}

Now i want to fetch the value of Count and Population using C#.

I have tried using JavaScriptSerializer(); But the problem is that its response time is much much slower.

Please suggest me a way to fetch the values from this JSON string.

Thanks

推荐答案

在这里使用我的文章: fastJSON
Use my article here : fastJSON


这篇关于如何在C#中反序列化JSON值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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