如何从json读取数据 [英] How to read data from json

查看:93
本文介绍了如何从json读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从json ... iam使用folling代码获取数据..但我不知道如何使用循环...



我尝试过:



Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Url),HttpWebRequest)

Dim响应如HttpWebResponse = DirectCast(request.GetResponse(),HttpWebResponse)

Dim reader As StreamReader = New StreamReader(response.GetResponseStream())

Dim o As JObject = JObject .Parse(reader.ReadToEnd)

How to get data from json.. iam using folling code.. but i don't know how to do it using loop..

What I have tried:

Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Url), HttpWebRequest)
Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
Dim reader As StreamReader = New StreamReader(response.GetResponseStream())
Dim o As JObject = JObject.Parse(reader.ReadToEnd)

推荐答案

第一种方式 - stackoverflow帖子



2 way - msdn microsoft post







这些链接将帮助您了解代码中缺少的内容。请仔细阅读。



快乐编程:)
1st way - stackoverflow post

2nd way - msdn microsoft post



These links will help you to understand what is missing in your code. Read carefully.

Happy Programming:)


为什么不在CP上搜索文章?例如。我的文章:

从C#或VB应用程序中使用Json WebService [ ^ ]
Why didn't you search for articles here on CP? E.g. my article:
Consuming a Json WebService from a C# or VB Application[^]


这篇关于如何从json读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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