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