关于解析Json

细嗅蔷薇 2013-02-23 07:35:16
有没有好的方法可以解析如下json格式的字符串:

[
[users, [
{
"id":3050636930,
"idstr":"3050636930",
"screen_name":"脑残对话",
"name":"脑残对话",
"province":"61",
"city":"1",
"location":"陕西 西安",
"description":"我不是",
"url":"http:\/\/naocanduihua.com",
"profile_image_url":"http:\/\/tp3.sinaimg.cn\/3050636930\/50\/5652856840\/1",
"profile_url":"naocanduihua",
"domain":"naocanduihua",
"weihao":"","gender":"m",
"followers_count":68795,
"friends_count":12,
"statuses_count":585,
"favourites_count":0,
"created_at":"Sat Oct 27 09:50:47 +0800 2012",
"following":true,
"allow_all_act_msg":true,
"geo_enabled":false,
"verified":false,
"verified_type":-1,
"remark":"",
"status_id":3548573037311300,
"allow_all_comment":true,
"avatar_large":"http:\/\/tp3.sinaimg.cn\/3050636930\/180\/5652856840\/1",
"verified_reason":"",
"follow_me":false,
"online_status":0,
"bi_followers_count":3,
"lang":"zh-cn","star":0,
"mbtype":0,"mbrank":0,
"block_word":0
},

...
...
]
]
...全文
177 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
细嗅蔷薇 2013-02-24
  • 打赏
  • 举报
回复
引用 3 楼 sp1234 的回复:
[ [users, [ { ...... }, ... ... ] ] 你这个糊弄谁?这是json?
http://open.weibo.com/wiki/2/friendships/friends
bakdfkuk 2013-02-24
  • 打赏
  • 举报
回复
仔细一看,还真是没有构成json格式
beyond_me21 2013-02-24
  • 打赏
  • 举报
回复
用json.net反序列化
  • 打赏
  • 举报
回复
[ [users, [ { ...... }, ... ... ] ] 你这个糊弄谁?这是json?
  • 打赏
  • 举报
回复
JS中可以直接用
var datas = {users:[{你那一砣}]};
var id = datas.users[0].id; 
//上面定义的是JS对象,json中users必须用双引号括起 或者用正则 或者自定义对象,反序列化
细嗅蔷薇 2013-02-23
  • 打赏
  • 举报
回复
多了最外面一层[]。

62,047

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧