I am new to C# REST API... I am just converting JSON to a string array
Here is my JSON
[{"Id":1000,"Name":"May","Address":"Atlanda","Country":"USA","Phone":12345}}
convert array like below code
string[] details={1000,May,Atlanda,USA,12345};
Help me to solve this problem
My code
public class details
{
public int Id { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string Country { get; set; }
public int Phone { get; set; }
}
This my class
var client = new RestClient("http://localhost:3000/customer/1000");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
string json = new JavaScriptSerializer().Serialize(response.Content);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…