Class JsonStreamDeserializerExtensions
Extensions for IJsonStreamReader.
Inherited Members
Namespace: Couchbase.Core.IO.Serializers
Assembly: Couchbase.NetClient.dll
Syntax
public static class JsonStreamDeserializerExtensions
Methods
| Edit this page View SourceReadObjectsAsync<T>(IJsonStreamReader, CancellationToken)
Read an array at the current point in the stream as an array of POCOs.
Declaration
public static IAsyncEnumerable<T> ReadObjectsAsync<T>(this IJsonStreamReader reader, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IJsonStreamReader | reader | The IJsonStreamReader. |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<T> | An IAsyncEnumerable<T> of the objects. |
Type Parameters
Name | Description |
---|---|
T | Type of POCO in the array. |
ReadTokensAsync(IJsonStreamReader, CancellationToken)
Read an array at the current point in the stream as an array of IJsonToken.
Declaration
public static IAsyncEnumerable<IJsonToken> ReadTokensAsync(this IJsonStreamReader reader, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IJsonStreamReader | reader | The IJsonStreamReader. |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IJsonToken> | An IAsyncEnumerable<T> of the tokens. |