Skip to content
Documentation

HAKOM.ErrorHandling.Http.Net.Api.Serialization.Json.Extensions Namespace

Contains extension methods for configuring JSON serialization of HAKOM error types without requiring the full HAKOM dependency injection container.

This namespace provides a lightweight way to add HAKOM error serialization to System.Text.Json.JsonSerializerOptions for scenarios where the full HAKOM serialization infrastructure is not available — for example, in test projects or lightweight HTTP clients.

var options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
};
options.AddErrorSerialization();
var response = await httpClient.GetAsync("/api/items/nonexistent");
var result = await JsonSerializer.DeserializeAsync<Result<Item>>(
await response.Content.ReadAsStreamAsync(),
options
);
Classes
JsonSerializerOptionsExtensions Provides methods for adding HAKOM converters to System.Text.Json.JsonSerializerOptions.
© 2026 Volue.Version v0.6.38017 November 2026