0

当我尝试通过错误“从 JsonReader 读取 JObject 时出错。当前 JsonReader 项目不是对象:字符串。路径'',第 1 行,位置 6。

文本:

"data":[{"username":"sex","bio":"#u24e2kyu24d4u24e7pressionsninstagramsex@gmail.com","website":"","profile_picture":"http://images.ak.com/profiles/profile_37086_75sq_1363954517.jpg","full_name":"sex","id":"37086"}]

我的代码:

JObject obj = JObject.Parse(text);

我想在解析为 JSON 时获取用户名值

4

1 回答 1

0

我会{ }在整个字符串周围放置一个。

即将文本更改为:

{"data":[{"username":"sex","bio":"#u24e2kyu24d4u24e7pressionsninstagramsex@gmail.com","website":"","profile_picture":"http://images.ak.com/profiles/profile_37086_75sq_1363954517.jpg","full_name":"sex","id":"37086"}]}
于 2013-05-03T03:22:39.297 回答