Qowaiv

Qowaiv.Text.Json.Serialization

When running TFM .NET 10.0 or later, JSON seralization works out-of-the-box with System.Text.Json. If you are stuck to an older TFM, you have to register JSON converters yourself. By registering QowaivJsonConverter you register a convention-based serializer that handles all SVOs following that convention.

Installation

dotnet add package Qowaiv.Text.Json.Serialization

Register the converter

var options = new JsonSerializerOptions()
{
    Converters = { new QowaivJsonConverter() },
};

Or, if you work with .NET core Web API:

using Qowaiv.Text.Json.Serialization;

public class Startup
{
    public void ConfigureServices(IServiceCollection services) => services
        .AddMvc() 
        .AddJsonOptions(options => 
        {
            options.JsonSerializerOptions.Converters.Add(new QowaivJsonConverter());
        });
}