A libary that provides serializer support for System.Text.Json for strongly-typed IDs.
$ dotnet add package Fluxera.StronglyTypedId.SystemTextJsonA library that provides strongly-typed Ids without code generation.
To implement a strongly-typed ID just inherit from the StronglyTypedId<,> base class.
The base class implements all aspects of the ID, like quality and comparablility.
public sealed class PersonId : StronglyTypedId<PersonId, string>
{
/// <inheritdoc />
public PersonId(string value) : base(value)
{
}
}
This library provides serializer support for the following libaries:
To use the serializer support just use the UseStronglyTypedId extension method to configure the
corresponding serializer.