public void testSubObjects() { AdminMenu m = new AdminMenu { Id = "3", Name = "新闻", Url = "/abc.aspx" }; String str = SimpleJsonString.ConvertObject(m); Console.WriteLine(str); AdminMenuGroup g = new AdminMenuGroup(); g.Id = "118"; g.Name = "菜单组"; g.AdminMenus = new List <AdminMenu>(); g.AdminMenus.Add(m); //String subStr = JSON.ObjectToJSON( g ); String subStr = JsonString.Convert(g); Console.WriteLine(subStr); }
public void testSubObjects() { AdminMenu m = new AdminMenu { Id = "3", Name = "新闻", Url = "/abc.aspx" }; String str = Json.ToString(m); Console.WriteLine(str); AdminMenuGroup g = new AdminMenuGroup(); g.Id = "118"; g.Name = "菜单组"; g.AdminMenus = new List <AdminMenu>(); g.AdminMenus.Add(m); String subStr = Json.ToString(g); Console.WriteLine(subStr); }
public void testSubObjects() { AdminMenu m = new AdminMenu { Id = "3", Name = "新闻", Url = "/abc.aspx" }; String str = Json.ToString( m ); Console.WriteLine( str ); AdminMenuGroup g = new AdminMenuGroup(); g.Id = "118"; g.Name = "菜单组"; g.AdminMenus = new List<AdminMenu>(); g.AdminMenus.Add( m ); String subStr = Json.ToString( g ); Console.WriteLine( subStr ); }
public void testSubObjects() { AdminMenu m = new AdminMenu { Id = "3", Name = "新闻", Url = "/abc.aspx" }; String str = SimpleJsonString.ConvertObject( m ); Console.WriteLine( str ); AdminMenuGroup g = new AdminMenuGroup(); g.Id = "118"; g.Name = "菜单组"; g.AdminMenus = new List<AdminMenu>(); g.AdminMenus.Add( m ); //String subStr = JSON.ObjectToJSON( g ); String subStr = JsonString.Convert( g ); Console.WriteLine( subStr ); }