Method Parse
Parse(string, AvroSchemaParseOptions?)
Parses a schema from JSON text.
public static AvroSchema Parse(string json, AvroSchemaParseOptions? options = null)
Parameters
jsonstringThe schema JSON.
optionsAvroSchemaParseOptionsParse options, or null for the defaults.
Returns
Exceptions
- AvroSchemaException
The JSON is malformed or the schema is invalid.
Parse(ReadOnlySpan<byte>, AvroSchemaParseOptions?)
Parses a schema from UTF-8 encoded JSON.
public static AvroSchema Parse(ReadOnlySpan<byte> utf8Json, AvroSchemaParseOptions? options = null)
Parameters
utf8JsonReadOnlySpan<byte>The schema JSON as UTF-8 bytes.
optionsAvroSchemaParseOptionsParse options, or null for the defaults.
Returns
Exceptions
- AvroSchemaException
The JSON is malformed or the schema is invalid.