Powiedzcie co robię źle.
public class Feeds
{
string created_at;
int entry_id;
int field1;
public string Created_at
{
get
{
return created_at;
}
set
{
created_at = value;
}
}
public int Entry_id
{
get
{
return entry_id;
}
set
{
entry_id = value;
}
}
public int Field1
{
get
{
return field1;
}
set
{
field1 = value;
}
}
}
public class FeedsCollection
{
private List<Feeds> feeds;
public List<Feeds> Feeds
{
get
{
return feeds;
}
set
{
feeds = value;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
using (var webClient = new WebClient())
{
string rawJSON = webClient.DownloadString("https://api.thingspeak.com/channels/618749/fields/1.json?results=");
FeedsCollection feedsCollection = JsonConvert.DeserializeObject<FeedsCollection>(rawJSON);
Console.Write(feedsCollection);
}
}
Po uruchomieniu feedsCollection = null