用一个对象列表public class Category{ Name {get;set;} IList Rooms {get;set;}}public class Room{ Name {get;set} ID {get;set;}}给IList赋值,再用Newtonsoft.Json来生成就行了...