Method ParseAsync
ParseAsync(Stream, CancellationToken)
Reads and parses a schema from a stream of UTF-8 encoded JSON.
public ValueTask<AvroSchema> ParseAsync(Stream utf8Json, CancellationToken cancellationToken = default)
Parameters
utf8JsonStreamThe stream to read; it is not disposed.
cancellationTokenCancellationTokenA token to cancel the read.
Returns
Exceptions
- AvroSchemaException
The JSON is malformed or the schema is invalid.