/// <summary>
    /// Initializes a new instance of the <see cref="JsonReader"/> class with the specified <see cref="TextReader"/>.
    /// </summary>
    /// <param name="reader">The <c>TextReader</c> containing the XML data to read.</param>
    public JsonTextReader(TextReader reader)
    {
      if (reader == null)
        throw new ArgumentNullException("reader");

      _reader = reader;
      _buffer = new StringBuffer(4096);
    }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JsonReader"/> class with the specified <see cref="TextReader"/>.
        /// </summary>
        /// <param name="reader">The <c>TextReader</c> containing the XML data to read.</param>
        public JsonReader(TextReader reader)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");

            _reader = reader;
            _buffer = new StringBuffer(4096);
            //_testBuffer = new StringBuilder();
            _currentState = State.Start;
            _stack = new List<JsonType>();
            _top = 0;
            Push(JsonType.None);
        }