Class JsonTextReader
Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
Inherited Members
Namespace: Bayat.Json
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JsonTextReader : JsonReader, IDisposable, IJsonLineInfo
Constructors
| Improve this Doc View SourceJsonTextReader(TextReader)
Initializes a new instance of the JsonReader class with the specified System.IO.TextReader.
Declaration
public JsonTextReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | The |
Fields
| Improve this Doc View SourceNameTable
Declaration
public PropertyNameTable NameTable
Field Value
Type | Description |
---|---|
PropertyNameTable |
Properties
| Improve this Doc View SourceArrayPool
Gets or sets the reader's character buffer pool.
Declaration
public IArrayPool<char> ArrayPool { get; set; }
Property Value
Type | Description |
---|---|
IArrayPool<System.Char> |
LineNumber
Gets the current line number.
Declaration
public int LineNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The current line number or 0 if no line information is available (for example, HasLineInfo returns false). |
LinePosition
Gets the current line position.
Declaration
public int LinePosition { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The current line position or 0 if no line information is available (for example, HasLineInfo returns false). |
Methods
| Improve this Doc View SourceClose()
Changes the state to closed.
Declaration
public override void Close()
Overrides
| Improve this Doc View SourceHasLineInfo()
Gets a value indicating whether the class can return line information.
Declaration
public bool HasLineInfo()
Returns
Type | Description |
---|---|
System.Boolean |
|
Read()
Reads the next JSON token from the stream.
Declaration
public override bool Read()
Returns
Type | Description |
---|---|
System.Boolean | true if the next token was read successfully; false if there are no more tokens to read. |
Overrides
| Improve this Doc View SourceReadAsBoolean()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override bool? ReadAsBoolean()
Returns
Type | Description |
---|---|
System.Nullable<System.Boolean> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsBytes()
Reads the next JSON token from the stream as a System.Byte[].
Declaration
public override byte[] ReadAsBytes()
Returns
Type | Description |
---|---|
System.Byte[] | A System.Byte[] or a null reference if the next JSON token is null. This method will return |
Overrides
| Improve this Doc View SourceReadAsDateTime()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override DateTime? ReadAsDateTime()
Returns
Type | Description |
---|---|
System.Nullable<System.DateTime> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsDateTimeOffset()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override DateTimeOffset? ReadAsDateTimeOffset()
Returns
Type | Description |
---|---|
System.Nullable<System.DateTimeOffset> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsDecimal()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override decimal? ReadAsDecimal()
Returns
Type | Description |
---|---|
System.Nullable<System.Decimal> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsDouble()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override double? ReadAsDouble()
Returns
Type | Description |
---|---|
System.Nullable<System.Double> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsInt32()
Reads the next JSON token from the stream as a System.Nullable<T>.
Declaration
public override int? ReadAsInt32()
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> | A System.Nullable<T>. This method will return |
Overrides
| Improve this Doc View SourceReadAsString()
Reads the next JSON token from the stream as a System.String.
Declaration
public override string ReadAsString()
Returns
Type | Description |
---|---|
System.String | A System.String. This method will return |