使用无效的键值“ fields”访问的JArray值。预期的阵列位置索引

使用无效的键值“ fields”访问的JArray值。预期的阵列位置索引,第1张

使用无效的键值“ fields”访问的JArray值。预期的阵列位置索引

如果您更换

// This takes the current bitcoin price and formats it so there is the correct amount of decimal placesstring story = (string)ja["response"]["results"]["fields"]["body"];

// This takes the current bitcoin price and formats it so there is the correct amount of decimal placesstring story = (string)ja["response"]["results"][0]["fields"]["body"];

应该适合您的示例。请注意,在您提供的示例中,结果后面的方括号表示要在访问代码中说明的数组。



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5615331.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存