Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VB.NET如何访问对象(从JSON反序列化)_Vb.net - Fatal编程技术网

VB.NET如何访问对象(从JSON反序列化)

VB.NET如何访问对象(从JSON反序列化),vb.net,Vb.net,如果有人能帮助我将突出显示的行输入变量,我将非常感激 我尝试了以下方法: Dim Fromid = FBrequest.data(0)(3)("from")(2) 但它表示,阵列中不存在密钥 图片位于imageshack.us /img33/1491/wtfjsondeserialized.png我建议做一个foreach来查看数组中存在哪些键。例如: For Each entry As String In FBrequest.data(0)(3) Console.WriteL

如果有人能帮助我将突出显示的行输入变量,我将非常感激

我尝试了以下方法:

Dim Fromid = FBrequest.data(0)(3)("from")(2)
但它表示,阵列中不存在密钥

图片位于imageshack.us


/img33/1491/wtfjsondeserialized.png

我建议做一个foreach来查看数组中存在哪些键。例如:

For Each entry As String In FBrequest.data(0)(3)
        Console.WriteLine(entry)

假设“from”是缺少的键。此外,我还建议在这一行上设置一个断点并添加一个watch语句。检查您的
FBRequest.data
变量以查看内容。

感谢您为我指明了正确的方向。我相信数据是在一个键值对数组中,键值对数组中。我认为这比必要的要复杂,但我已经弄明白了。