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