Table of Contents

Class JsonMarshaller<T>

Namespace
Apache.Ignite.Marshalling
Assembly
Apache.Ignite.dll

JSON marshaller. Uses JsonSerializer.

public sealed class JsonMarshaller<T> : IMarshaller<T>

Type Parameters

T

Object type.

Inheritance
JsonMarshaller<T>
Implements
Inherited Members

Constructors

JsonMarshaller(JsonSerializerOptions?)

Initializes a new instance of the JsonMarshaller<T> class.

public JsonMarshaller(JsonSerializerOptions? options = null)

Parameters

options JsonSerializerOptions

Options.

Properties

Options

Gets the options.

public JsonSerializerOptions Options { get; }

Property Value

JsonSerializerOptions

Methods

Marshal(T, IBufferWriter<byte>)

Marshals (serializes) the specified object into the provided writer.

public void Marshal(T obj, IBufferWriter<byte> writer)

Parameters

obj T

Object. Not null - Ignite handles nulls separately and does not invoke the marshaller.

writer IBufferWriter<byte>

Writer.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Unmarshal(ReadOnlySpan<byte>)

Unmarshals (deserializes) an object from the provided data.

public T Unmarshal(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

Serialized data.

Returns

T

Deserialized object.