[Serializable]
public class OrderHead
{
public String OrderId { get; set; }
public String OrderName { get; set; }
}
[Serializable]
public class OrderTail
{
public String Money { get; set; }
public String Status { get; set; }
}
[Serializable]
public class Order
{
public OrderHead OrderHead { get; set; }
public OrderTail OrderTail { get; set; }
}
static void Main(string[] args)
{
string config = "{OrderHead:{\"OrderId\":\"1\",\"OrderName\":\"Abc\"},OrderTail:{\"Money\":\"134\",\"Status\":\"Send\"}}";
var order = config.ToInstance
config = "[{OrderHead:{\"OrderId\":\"1\",\"OrderName\":\"Abc\"},OrderTail:{\"Money\":\"134\",\"Status\":\"Send\"}},{OrderHead:{\"OrderId\":\"2\",\"OrderName\":\"Def\"},OrderTail:{\"Money\":\"235\",\"Status\":\"Paid\"}}]";
var listAA = config.ToInstance
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章