Table of Contents

Namespace AvroSharp.Generic

Reads and writes Avro data without generated types, as AvroValues, with records as GenericRecord and fixed values as GenericFixed.

The schemas come from AvroSharp.Schemas. The generic overloads of AvroSharp.Containers, AvroSharp.Messages and AvroSharp.Streams (CreateGeneric, OpenGeneric) use these readers and writers.

Classes

AvroBinaryComparer

Compares Avro binary data by the specification's sort order for one schema, without decoding it, as Apache Avro Java's BinaryData.compare does (and as Hadoop sorts by it). Both inputs are read at once, only as far as the first difference. Instances are cached per schema and are thread-safe.

AvroRandomData

Random values of a schema, for property tests and fuzz corpora, as Apache Avro Java's RandomData makes them. The same seed and options give the same values, on every target framework.

AvroRandomDataOptions

The shape of the values AvroRandomData generates.

AvroValueComparer

Compares AvroValue data by the specification's sort order for one schema, as Apache Avro Java's GenericData.compare does. Instances are cached per schema and are thread-safe.

AvroValueTransformer

Walks a generic value together with its schema and replaces values inside it: the basis for field-level data rules, encryption and redaction.

GenericDatumJsonReader

Reads the Avro JSON encoding into AvroValues for one schema. Instances are cached per schema and are thread-safe.

GenericDatumJsonWriter

Writes AvroValue data in the Avro JSON encoding for one schema. The schema is compiled once into a tree of typed writer nodes; instances are cached per schema and are thread-safe.

GenericDatumReader

Reads Avro binary data into AvroValues for one schema. The schema is compiled once into a tree of typed reader nodes, so reading does not inspect the schema; instances are cached per schema and are thread-safe.

GenericDatumReaderOptions

Limits that protect GenericDatumReader against malformed or hostile input.

GenericDatumWriter

Writes AvroValue data in Avro binary encoding for one schema. The schema is compiled once into a tree of typed writer nodes, so writing does not inspect the schema; instances are cached per schema and are thread-safe.

GenericDatumWriterOptions

Limits for GenericDatumWriter and GenericDatumJsonWriter, and the JSON writer's labels.

GenericFixed

A fixed value in the generic data model: a schema and exactly Size bytes.

GenericRecord

A record in the generic data model: a schema and one AvroValue per field.

GenericRecordBuilder

Builds a GenericRecord field by field, as Apache Avro Java's GenericRecordBuilder does: a field left unset takes its schema default, and a field with neither a value nor a default is an error.

Structs

AvroFieldContext

Where a value handed to an AvroFieldTransform is: the record field, and the value's schema.

AvroValue

Any Avro value in the generic data model, without boxing: primitives are stored inline, and strings, bytes, records, enums, arrays, maps and fixed values by reference.

Enums

AvroValueKind

The kind of value held by an AvroValue.

JsonUnionBranchNames

How GenericDatumJsonWriter labels a union value's branch.

Delegates

AvroFieldTransform

Replaces a value found inside a record field. Receives the field it is in and the value; returns the value to keep, which may be the same one.