Class JTokenReader
Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Bayat.Json.Linq
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JTokenReader : JsonReader, IDisposable, IJsonLineInfo
Constructors
| Improve this Doc View SourceJTokenReader(JToken)
Initializes a new instance of the JTokenReader class.
Declaration
public JTokenReader(JToken token)
Parameters
Type | Name | Description |
---|---|---|
JToken | token | The token to read from. |
JTokenReader(JToken, String)
Declaration
public JTokenReader(JToken token, string initialPath)
Parameters
Type | Name | Description |
---|---|---|
JToken | token | |
System.String | initialPath |
Properties
| Improve this Doc View SourceCurrentToken
Gets the JToken at the reader's current position.
Declaration
public JToken CurrentToken { get; }
Property Value
Type | Description |
---|---|
JToken |
Path
Gets the path of the current JSON token.
Declaration
public override string Path { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
| Improve this Doc View SourceRead()
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
Explicit Interface Implementations
| Improve this Doc View SourceIJsonLineInfo.HasLineInfo()
Declaration
bool IJsonLineInfo.HasLineInfo()
Returns
Type | Description |
---|---|
System.Boolean |
IJsonLineInfo.LineNumber
Declaration
int IJsonLineInfo.LineNumber { get; }
Returns
Type | Description |
---|---|
System.Int32 |
IJsonLineInfo.LinePosition
Declaration
int IJsonLineInfo.LinePosition { get; }
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.IDisposable