如何从JSON数组(或字符串)的元素? [英] How to get elements from json array(or string)?

查看:139
本文介绍了如何从JSON数组(或字符串)的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

{"status":1,"msg":"Success","details":{"123456789":{"id":"4029292","name":"ram"}}}

这是我的字符串(我认为JSON数组不知道)。我得到这个来自web服务的响应。

This is my string (I think json array not sure). I got this as response from webservice.

我如何从这个元素呢?

How do I get elements from this?

推荐答案

如果你试图解析它在C#中,尝试使用的 newtonsoft json.net 解析JSON响应。

If you are trying to parse it in C#, try using newtonsoft json.net for parsing json response.

这是简单和容易

以下是一些引用

<一个href=\"http://stackoverflow.com/questions/2546138/deserializing-json-data-to-c-sharp-using-json-net\">Link1

<一个href=\"http://stackoverflow.com/questions/4749639/deserializing-json-to-net-object-using-newtonsoft-or-linq-to-json-maybe\">Link2

链接3

这篇关于如何从JSON数组(或字符串)的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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