Hi All I am calling an rest service to get countries and that service is returning countries to me but it is not coming as a list or m unable to convert it to a list, Is it possible to convert the country list and bind it to a combo box. Also I want to clarify I have not created the service or I can't modify the service but I have to use that service, that is mandatory for me.
{
"CountryList":"<Countries><Country><Code>0<\/Code><Name>aaaa<\/Name><\/Country><Country><Code>1<\/Code><Name>bbbbbb<\/Name><\/Country> ... other countries ... <\/Countries>",
"Error":{
"ErrorCode": 0,
"ErrorMessage": ""
}
}
I am using this class to parse this json
public class Error
{
public int ErrorCode { get; set; }
public string ErrorMessage { get; set; }
}
public class Country
{
public string CountryList { get; set; }
public Error Error { get; set; }
}