背景:用postman做接口测试可以使用application/x-www-form-urlencoded请求,也可以使用json请求,接口文档如下: 请求参数 字段 类型 是否必填 注释 website String Y 选择网站: =GB activity_child_id Int N Id update_product_cycle int N 产品id website_online_time array N 网站上架天数: [start开始,end结束] 网站上架天数不以当前时间计算,按数
将类的内容写入到JSON格式的字符串中 本例中建立了Person类,赋值后将类中内容写入到字符串中 运行本代码需要添加引用动态库Newtonsoft.Json 程序代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //需要引用 Newtonsoft.Json.dll using Newtonsoft.Json