-
-
Save 9034725985/f990b78b08a158003dd9 to your computer and use it in GitHub Desktop.
json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Participant | |
{ | |
public string id { get; set; } | |
public string tournament_id { get; set; } | |
public string name { get; set; } | |
public string seed { get; set; } | |
public bool active { get; set; } | |
public string created_at { get; set; } | |
public string updated_at { get; set; } | |
public string invite_email { get; set; } | |
public string final_rank { get; set; } | |
public string misc { get; set; } | |
public string icon { get; set; } | |
public bool on_waiting_list { get; set; } | |
public string invitation_id { get; set; } | |
public string group_id { get; set; } | |
public string checked_in_at { get; set; } | |
public string challonge_username { get; set; } | |
public string challonge_email_address_verified { get; set; } | |
public bool removable { get; set; } | |
public bool participatable_or_invitation_attached { get; set; } | |
public bool confirm_remove { get; set; } | |
public bool invitation_pending { get; set; } | |
public string display_name_with_invitation_email_address { get; set; } | |
public string email_hash { get; set; } | |
public string username { get; set; } | |
public string display_name { get; set; } | |
public string attached_participatable_portrait_url { get; set; } | |
public bool can_check_in { get; set; } | |
public bool checked_in { get; set; } | |
public bool reactivatable { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Player | |
{ | |
public Participant participant { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string my_text = "{\"participant\":{\"id\":36731929,\"tournament_id\":2305074,\"name\":\"Alexis2dGod\",\"seed\":1,\"active\":true,\"created_at\":\"2016-03-05T04:28:51.482-05:00\",\"updated_at\":\"2016-03-05T04:28:51.482-05:00\",\"invite_email\":null,\"final_rank\":7,\"misc\":null,\"icon\":null,\"on_waiting_list\":false,\"invitation_id\":null,\"group_id\":null,\"checked_in_at\":null,\"challonge_username\":null,\"challonge_email_address_verified\":null,\"removable\":false,\"participatable_or_invitation_attached\":false,\"confirm_remove\":true,\"invitation_pending\":false,\"display_name_with_invitation_email_address\":\"Alexis2dGod\",\"email_hash\":null,\"username\":null,\"display_name\":\"Alexis2dGod\",\"attached_participatable_portrait_url\":null,\"can_check_in\":false,\"checked_in\":false,\"reactivatable\":false}}"; | |
Player player = Newtonsoft.Json.JsonConvert.DeserializeObject<Player>(my_text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment