コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: JsonSerializeTest.cs プロジェクト: zuhuizou/wojilu
        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);
        }
コード例 #3
0
ファイル: JsonSerializeTest.cs プロジェクト: Boshin/wojilu
        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 );
        }
コード例 #4
0
ファイル: ObjectToJsonString.cs プロジェクト: robin88/wojilu
        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 );
        }