internal TwitchUser ParseUser(string json)
{
// json = "_id":79242000,"name":"volt_100","created_at":"2015-01-08T17:08:01Z","updated_at":"2015-06-20T16:41:10Z","_links":{"self":"https://api.twitch.tv/kraken/users/volt_100"},"display_name":"volt_100","logo":"http://static-cdn.jtvnw.net/jtv_user_pictures/volt_100-profile_image-653aa9b8c5343c09-300x300.jpeg","bio":null
uint id;
if(uint.TryParse(json.GetBetween("\"_id\":", ","), out id)) {
string name = json.GetBetween("\"display_name\":\"", "\"");
DateTime created = default(DateTime);
DateTime.TryParse(json.GetBetween("\"created_at\":\"", "\""), out created);
string logo = json.GetBetween("\"logo\":\"", "\"");
string bio = json.GetBetween("\"bio\":\"", "\"");
return factory.GetUser(id, name, created, logo, bio);
} else {
return null;
}
}