Class BsonReader
Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
Implements
Inherited Members
Namespace: Bayat.Json.Bson
Assembly: Bayat.Json.Runtime.dll
Syntax
public class BsonReader : JsonReader, IDisposable
Constructors
| Improve this Doc View SourceBsonReader(BinaryReader)
Initializes a new instance of the Bson
Declaration
public BsonReader(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | The reader. |
BsonReader(BinaryReader, Boolean, DateTimeKind)
Initializes a new instance of the Bson
Declaration
public BsonReader(BinaryReader reader, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | The reader. |
System. |
readRootValueAsArray | if set to |
System. |
dateTimeKindHandling | The System. |
BsonReader(Stream)
Initializes a new instance of the Bson
Declaration
public BsonReader(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System. |
stream | The stream. |
BsonReader(Stream, Boolean, DateTimeKind)
Initializes a new instance of the Bson
Declaration
public BsonReader(Stream stream, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling)
Parameters
Type | Name | Description |
---|---|---|
System. |
stream | The stream. |
System. |
readRootValueAsArray | if set to |
System. |
dateTimeKindHandling | The System. |
Properties
| Improve this Doc View SourceDateTimeKindHandling
Gets or sets the System.
Declaration
public DateTimeKind DateTimeKindHandling { get; set; }
Property Value
Type | Description |
---|---|
System. |
The System. |
JsonNet35BinaryCompatibility
Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary.
Declaration
[Obsolete("JsonNet35BinaryCompatibility will be removed in a future version of Json.NET.")]
public bool JsonNet35BinaryCompatibility { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
ReadRootValueAsArray
Gets or sets a value indicating whether the root object will be read as a JSON array.
Declaration
public bool ReadRootValueAsArray { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Methods
| Improve this Doc View SourceClose()
Changes the Json
Declaration
public override void Close()
Overrides
| Improve this Doc View SourceRead()
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. |