为了账号安全,请及时绑定邮箱和手机立即绑定

如何从JSON对象字符串自动生成C#类文件

如何从JSON对象字符串自动生成C#类文件

慕神8447489 2019-07-01 10:01:09
如何从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 关注
  • 870 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信