0
我有这个课程。asp.net json .net对象
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace TestConnect
{
public class UserInfo
{
public string id { get; set; }
public string name { get; set; }
public string picture { get; set; }
public string bio { get; set; }
public string quotes { get; set; }
//public HometownInfo from { get; set;
public From hometown { get; set; }
public string relationship { get; set; }
public string gender { get; set; }
public List<Education> data { get; set; }
}
public class Education
{
public From school { get; set; }
public From year { get; set; }
//public From [] concentration { get; set; }
public string type { get; set; }
}
}
public class HometownInfo
{
public string id { get; set; }
public string homename { get; set; }
}
现在试图做
url = "https://graph.facebook.com/me?fields=education&access_token=" + oAuth.Token;
json = oAuth.WebRequest(oAuthFacebook.Method.GET, url, String.Empty);
Education edu = js.Deserialize<Education>(json);
foreach(Education_history edu_history in Education.data)
给出了一个错误不设置到对象的实例
对象引用。说明:在 当前Web 请求的执行
感谢 用户