示例#1
0
        public void AddChild(JsonItem jsonItem)
        {
            if (this.children == null)
            {
                this.children = new List <JsonItem>();
            }

            this.children.Add(jsonItem);
        }
示例#2
0
 /// <summary>
 /// This constructor is only used when a node already exists.
 /// The goal is to avoid circular dependency when transforming the object to json string.
 /// </summary>
 public JsonItem(JsonItem item)
 {
     this.name = Utils.GetDuplicateStr(item.name);
 }