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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Extensions.Object" Version="4.0.4389" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Object" Version="4.0.4389" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Object" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.Object --version 4.0.4389
                    
#r "nuget: Soenneker.Extensions.Object, 4.0.4389"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Extensions.Object@4.0.4389
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.Object&version=4.0.4389
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Object&version=4.0.4389
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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() throws ArgumentNullException and 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Update dependency Soenneker.Utils.Json to 4.0.2731 (#5605)