Table of Contents

Method Serialize

Namespace
AvroSharp.Confluent
Assembly
AvroSharp.Confluent.dll

Serialize(AvroValue, SerializationContext)

Writes a record with its schema, without a task once its schema ID is known. A null value is a tombstone: no message body.

public byte[]? Serialize(AvroValue data, SerializationContext context)

Parameters

data AvroValue

The record.

context SerializationContext

The topic, the component (key or value) and the headers.

Returns

byte[]

The message body, or null for a tombstone.

Exceptions

ArgumentException

data is not a record.