object obj = new { Provider = appointmentErpStoreEntity.ProvinceName, City = appointmentErpStoreEntity.CityName, District = appointmentErpStoreEntity.CountyName, Address = appointmentErpStoreEntity.Address }; addressInfo = JsonConvert.SerializeObject(obj);
如果赋值为null,一样可以转换成json,
变成:{“Provider”:null,”City”:null........}
标签:City,C#,对象,json,appointmentErpStoreEntity,Provider,null From: https://www.cnblogs.com/jankie1122/p/11108703.html