Soenneker.Extensions.Object
11.0.4426
Prefix Reserved
dotnet add package Soenneker.Extensions.Object --version 11.0.4426
NuGet\Install-Package Soenneker.Extensions.Object -Version 11.0.4426
<PackageReference Include="Soenneker.Extensions.Object" Version="11.0.4426" />
<PackageVersion Include="Soenneker.Extensions.Object" Version="11.0.4426" />
<PackageReference Include="Soenneker.Extensions.Object" />
paket add Soenneker.Extensions.Object --version 11.0.4426
#r "nuget: Soenneker.Extensions.Object, 11.0.4426"
#:package Soenneker.Extensions.Object@11.0.4426
#addin nuget:?package=Soenneker.Extensions.Object&version=11.0.4426
#tool nuget:?package=Soenneker.Extensions.Object&version=11.0.4426
Soenneker.Extensions.Object
Object guards, numeric type checks, and JSON HTTP content using caller-supplied serialization metadata.
Installation
dotnet add package Soenneker.Extensions.Object
Create request bodies
using Soenneker.Extensions.Object;
using HttpContent content = request.ToHttpContent(MyJsonContext.Default.SearchRequest);
ToHttpContent(), ToHttpContentAndString(), and ToHttpContentWithKey() accept JsonTypeInfo<T> metadata. Their Try variants return null results and optionally log conversion errors. The caller owns and must dispose returned content objects.
Build query strings without reflection
string query = request.ToQueryString(MyJsonContext.Default.SearchRequest);
Pass source-generated JsonTypeInfo<T> metadata, as with the HTTP-content helpers. Names, ignore conditions, and converters follow that metadata. Names and values are percent-encoded, booleans and numbers use JSON formatting, and nested objects and arrays are encoded as JSON. Null inputs and empty objects return an empty string; non-object JSON roots are rejected.
Guards
IsObjectNumeric()checks whether an object's runtime type is numeric; null throws.ThrowIfNull()throwsArgumentNullExceptionand uses the calling member name unless a name is supplied.
Reflection extensions
For ToDictionaryViaReflection(), query strings, form encoding, property diagnostics, and ToHttpContentViaReflection(), install Soenneker.Extensions.Objects.Reflection and import Soenneker.Extensions.Objects.Reflection.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Constants.Auth (>= 11.0.632)
- Soenneker.Extensions.Type (>= 11.0.722)
- Soenneker.Utils.Json (>= 11.0.2769)
- Soenneker.Utils.PooledStringBuilders (>= 11.0.44)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Soenneker.Extensions.Object:
| Package | Downloads |
|---|---|
|
Soenneker.Extensions.HttpClient
A collection of helpful HttpClient extension methods, like retry and auto (de)serialization |
|
|
Soenneker.Blazor.Utils.InteropEventListener
Manages the registration, removal, and disposal of .NET object references used for interop event listeners. |
|
|
Soenneker.Blazor.ApiClient
A lightweight and efficient API client wrapper for Blazor applications, simplifying HTTP communication with support for asynchronous calls, cancellation tokens, and JSON serialization. |
|
|
Soenneker.GitHub.Repositories
Creates, discovers, configures, and deletes GitHub repositories. |
|
|
Soenneker.GitHub.Repositories.Rulesets
Creates, lists, and deletes GitHub repository rulesets |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.4426 | 791 | 10/27/2026 |
| 11.0.4425 | 140 | 10/26/2026 |
| 11.0.4424 | 214 | 10/26/2026 |
| 11.0.4423 | 99 | 10/26/2026 |
| 11.0.4422 | 254 | 10/26/2026 |
| 11.0.4421 | 339 | 10/26/2026 |
| 11.0.4420 | 237 | 10/26/2026 |
| 4.0.4419 | 5,084 | 10/15/2026 |
| 4.0.4418 | 884 | 10/15/2026 |
| 4.0.4417 | 346 | 10/15/2026 |
| 4.0.4416 | 280 | 10/15/2026 |
| 4.0.4415 | 838 | 10/14/2026 |
| 4.0.4410 | 732 | 10/14/2026 |
| 4.0.4409 | 894 | 10/14/2026 |
| 4.0.4401 | 632 | 10/13/2026 |
| 4.0.4399 | 678 | 10/12/2026 |
| 4.0.4397 | 837 | 10/12/2026 |
| 4.0.4396 | 1,720 | 10/12/2026 |
| 4.0.4395 | 806 | 10/12/2026 |
| 4.0.4394 | 342 | 10/11/2026 |
Updated Multiple NuGet packages