Soenneker.Extensions.Object
4.0.4389
Prefix Reserved
dotnet add package Soenneker.Extensions.Object --version 4.0.4389
NuGet\Install-Package Soenneker.Extensions.Object -Version 4.0.4389
<PackageReference Include="Soenneker.Extensions.Object" Version="4.0.4389" />
<PackageVersion Include="Soenneker.Extensions.Object" Version="4.0.4389" />
<PackageReference Include="Soenneker.Extensions.Object" />
paket add Soenneker.Extensions.Object --version 4.0.4389
#r "nuget: Soenneker.Extensions.Object, 4.0.4389"
#:package Soenneker.Extensions.Object@4.0.4389
#addin nuget:?package=Soenneker.Extensions.Object&version=4.0.4389
#tool nuget:?package=Soenneker.Extensions.Object&version=4.0.4389
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Constants.Auth (>= 4.0.622)
- Soenneker.Extensions.Type (>= 4.0.705)
- Soenneker.Utils.Json (>= 4.0.2731)
- Soenneker.Utils.PooledStringBuilders (>= 4.0.34)
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 |
|---|---|---|
| 4.0.4389 | 0 | 9/29/2026 |
| 4.0.4388 | 0 | 9/29/2026 |
| 4.0.4387 | 35 | 9/29/2026 |
| 4.0.4386 | 392 | 9/29/2026 |
| 4.0.4385 | 315 | 9/28/2026 |
| 4.0.4384 | 809 | 9/26/2026 |
| 4.0.4383 | 79 | 9/26/2026 |
| 4.0.4381 | 879 | 9/25/2026 |
| 4.0.4380 | 361 | 9/25/2026 |
| 4.0.4379 | 209 | 9/25/2026 |
| 4.0.4378 | 288 | 9/25/2026 |
| 4.0.4377 | 191 | 9/25/2026 |
| 4.0.4375 | 80 | 9/25/2026 |
| 4.0.4374 | 1,418 | 9/24/2026 |
| 4.0.4373 | 3,407 | 9/16/2026 |
| 4.0.4372 | 411 | 9/16/2026 |
| 4.0.4371 | 591 | 9/16/2026 |
| 4.0.4370 | 921 | 9/16/2026 |
| 4.0.4368 | 662 | 9/16/2026 |
| 4.0.4366 | 372 | 9/15/2026 |
Update dependency Soenneker.Utils.Json to 4.0.2731 (#5605)