Table of Contents

Interface IIronLedgerSerializer

Namespace
Tudormobile.IronLedgerLib
Assembly
Tudormobile.IronLedgerLib.dll

Defines a serializer for IronLedger types.

public interface IIronLedgerSerializer

Remarks

Implementations can use any serialization format (JSON, XML, binary, etc.). The default implementation uses System.Text.Json.

Properties

ContentType

Gets the MIME content type produced by this serializer (e.g. application/json).

string ContentType { get; }

Property Value

string

Methods

Deserialize<T>(string)

Deserializes a string representation to an object.

T? Deserialize<T>(string data)

Parameters

data string

The string representation to deserialize.

Returns

T

The deserialized object. Some implementations may return null if deserialization fails, while others may throw an exception (for example, when the input is invalid for the chosen serialization format).

Type Parameters

T

The type of object to deserialize.

Serialize<T>(T)

Serializes an object to a string representation.

string Serialize<T>(T value)

Parameters

value T

The value to serialize.

Returns

string

A string representation of the object.

Type Parameters

T

The type of object to serialize.