如何从JSON对象字符串自动生成C#类文件给定以下JSON对象,form = {
"name": "",
"address": {
"street": "",
"city": "",
"province": "",
"postalCode": "",
"country": ""
},
"phoneDay": "",
"phoneCell": "",
"businessName": "",
"website": "",
"email": ""}什么是自动生成以下C#类的工具?public class ContactInfo{
public string Name { get; set; }
public Address Address { get; set; }
public string PhoneDay { get; set; }
public string PhoneCell { get; set; }
public string BusinessName { get; set; }
public string Website { get; set; }
public string Email { get; set; }}public class Address{
public string Street { get; set; }
public string City { get; set; }
public string Province { get; set; }
public string PostalCode { get; set; }
public string Country { get; set; }}我们已经研究过这些问题:从JSONSchema生成C#类询问JSON模式,这可能是今后使用的一种方法。JSON对象生成的C#类的优缺点
3 回答
- 3 回答
- 0 关注
- 917 浏览
添加回答
举报
0/150
提交
取消