public void BuildBranch(string key) { var element = new JSONComposite(key); _lastCompositeStack.Peek().AddChild(element); _lastCompositeStack.Push(element); }
public JSONBuilder() { _root = new JSONComposite("root"); _lastCompositeStack = new Stack <JSONComposite>(); _lastCompositeStack.Push(_root); }