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.
Remarks
Section titled “Remarks”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. |
Was this page helpful?Thanks for your feedback!