Table of Contents

Class NatsJsonSerializer<T>

Namespace
NATS.Client.Serializers.Json
Assembly
NATS.Client.Serializers.Json.dll

Reflection based JSON serializer for NATS.

public sealed class NatsJsonSerializer<T> : INatsSerializer<T>, INatsSerialize<T>, INatsDeserialize<T>

Type Parameters

T
Inheritance
NatsJsonSerializer<T>
Implements
Inherited Members

Remarks

This serializer is not suitable for native AOT deployments since it might rely on reflection

Constructors

NatsJsonSerializer()

Reflection-based JSON serializer for NATS.

NatsJsonSerializer(JsonSerializerOptions)

Creates a new instance of NatsJsonSerializer<T> with the specified options.

Properties

Default

Default instance of NatsJsonSerializer<T> with option set to ignore null values when writing.

Methods

CombineWith(INatsSerializer<T>)

Combines the current serializer with the specified serializer.

Deserialize(in ReadOnlySequence<byte>)

Deserialize value from buffer.

Serialize(IBufferWriter<byte>, T?)

Serialize value to buffer.