Serialization of Atmoos.Quantities types with System.Text.Json.
$ dotnet add package Atmoos.Quantities.Serialization.Text.JsonEnables serialisation of Atmoos.Quantities using System.Text.Json.
Use the extension method:
using Atmoos.Quantities.Serialization.Text.Json;
/* ... */
public static void Configure(System.Text.Json.JsonSerializerOptions options)
{
// good for the most basic units.
options.EnableQuantities();
// optionally, register other assemblies that define more units.
options.EnableQuantities(typeof(MyType).Assembly);
}