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 Json
Declaration
public JsonTextReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | The |
Fields
| Improve this Doc View SourceNameTable
Declaration
public PropertyNameTable NameTable
Field Value
Type | Description |
---|---|
Property |
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 |
---|---|
IArray |
LineNumber
Gets the current line number.
Declaration
public int LineNumber { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
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. |
|
Read()
Reads the next JSON token from the stream.
Declaration
public override bool Read()
Returns
Type | Description |
---|---|
System. |
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. |
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.
Declaration
public override byte[] ReadAsBytes()
Returns
Type | Description |
---|---|
System. |
A System. |
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. |
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. |
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. |
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. |
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. |
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.
Declaration
public override string ReadAsString()
Returns
Type | Description |
---|---|
System. |
A System. |