none
jsontosharp生成以下的类,不会使用~ RRS feed

  • 问题

  • 
            原json
        {
        	"name":"key_word",
        	"children":
        	[
        		{
        			"name": "lisi",
        			"children": 
        			[
        				{
        					"name":"age",
        					 "children": 
        					 	[
        							
    
        {"name":"25"}
        						]
        				},
        			 	{
        					 "name": "grade",
        					 "children": 
        					 	[
        							
    
        {"name": "100"}
        						]
        				}
        			]
        		}
        	]
        }
    
    
    
        生成类
         
        public class Child3
        {
            public string name { get; set; }
        }
    
        public class Child2
        {
            public string name { get; set; }
            public List<Child3> children { get; set; }
        }
    
        public class Child
        {
            public string name { get; set; }
            public List<Child2> children { get; set; }
        }
    
        public class RootObject
        {
            public string name { get; set; }
            public List<Child> children { get; set; }
        }
    求给个例子~

    Change

    2014年11月23日 4:42