An example of a structure in C# to use the information in that file format Json, performed this example using this website
public class Guild
{
public string name { get; set; }
public string rank { get; set; }
}
public class LastLogin
{
public string date { get; set; }
public int timezone_type { get; set; }
public string timezone { get; set; }
}
public class Data
{
public string name { get; set; }
public string sex { get; set; }
public string vocation { get; set; }
public int level { get; set; }
public int achievement_points { get; set; }
public string world { get; set; }
public string residence { get; set; }
public string married_to { get; set; }
public Guild guild { get; set; }
public List<LastLogin> last_login { get; set; }
public string comment { get; set; }
public string account_status { get; set; }
public string status { get; set; }
}
public class Achievement
{
public int stars { get; set; }
public string name { get; set; }
}
public class Created
{
public string date { get; set; }
public int timezone_type { get; set; }
public string timezone { get; set; }
}
public class AccountInformation
{
public string loyalty_title { get; set; }
public Created created { get; set; }
}
public class OtherCharacter
{
public string name { get; set; }
public string world { get; set; }
public string status { get; set; }
}
public class Characters
{
public Data data { get; set; }
public List<Achievement> achievements { get; set; }
public List<object> deaths { get; set; }
public AccountInformation account_information { get; set; }
public List<OtherCharacter> other_characters { get; set; }
}
public class Information
{
public int api_version { get; set; }
public double execution_time { get; set; }
public string last_updated { get; set; }
public string timestamp { get; set; }
}
public class RootObject
{
public Characters characters { get; set; }
public Information information { get; set; }
}
To carry out the deserialization I’m using Json.NET:
RootObject rObject = JsonConvert.DeserializeObject<RootObject>(json);
This is the website of the OS in Portuguese, translate your question
– Ricardo Pontual
Your problem is that you are not passing any json/string files to Deserializeobject, you are passing only the url and no request was made to that address for information that will be deserialized.
– MauroAlmeida