Exemplo n.º 1
0
        public void BuildBranch(string name)
        {
            JSONBranch branch = new JSONBranch(name, false, currentBranch);

            currentBranch.AddChild(branch);
            currentBranch = branch;
        }
Exemplo n.º 2
0
 public JSONLeaf(string name, string content, JSONBranch parent)
 {
     _name    = name;
     _content = content;
     _parent  = parent;
 }
Exemplo n.º 3
0
 public JSONBuilder()
 {
     root = new JSONBranch("root", true, null);
     root.SetParent(root);
     currentBranch = root;
 }
Exemplo n.º 4
0
 public void CloseBranch()
 {
     currentBranch = currentBranch.GetParent();
 }
Exemplo n.º 5
0
 public void SetParent(JSONBranch parent)
 {
     _parent = parent;
 }
Exemplo n.º 6
0
 public JSONBranch(string name, bool isRoot, JSONBranch parent)
 {
     _name   = name;
     _isRoot = isRoot;
     _parent = parent;
 }