Table of Contents

Method Read

Namespace
AvroSharp.Generic
Assembly
AvroSharp.dll

Read(string)

Reads one value from a JSON string. Nothing but whitespace may follow it.

public AvroValue Read(string json)

Parameters

json string

The JSON text.

Returns

AvroValue

Exceptions

AvroDataException

The JSON is malformed or does not match the schema.

Read(ReadOnlySpan<byte>)

Reads one value from UTF-8 JSON. Nothing but whitespace may follow it.

public AvroValue Read(ReadOnlySpan<byte> utf8Json)

Parameters

utf8Json ReadOnlySpan<byte>

The JSON text.

Returns

AvroValue

Exceptions

AvroDataException

The JSON is malformed or does not match the schema.

Read(ref Utf8JsonReader)

Reads the next JSON value from reader, for example one line of a stream of values. The reader is left on the last token of the value.

public AvroValue Read(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

The source, positioned before or on the first token of the value.

Returns

AvroValue

Exceptions

AvroDataException

The JSON is malformed or does not match the schema.