//匿​名​对象
        var list = new List<object>();

        list.Add(new {BranchName = "A01", Address = "人民路108号", Tel = "66666666"});
        list.Add(new {BranchName = "A02", Address = "天津路888号", Tel = "88888888"});
   
        var result = new { title = '分店地址' list = list};

//非匿​名​对象
        class Branch
        {
            public string BranchName { get; set; }
            public string Address { get; set; }
            public string Tel { get; set; }
        }

        List<Branch> list = new List<Branch>();

        list.Add(new Branch() {BranchName = "A01", Address = "人民路108号", Tel = "66666666"});        
        list.Add(new Branch() {BranchName = "A02", Address = "天津路888号", Tel = "88888888"});        

        var result = new { title = '分店地址' list = list};


本文转载:CSDN博客