Polhem.JsonRpc.Client 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Polhem.JsonRpc.Client --version 1.1.1
                    
NuGet\Install-Package Polhem.JsonRpc.Client -Version 1.1.1
                    
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="Polhem.JsonRpc.Client" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Polhem.JsonRpc.Client" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Polhem.JsonRpc.Client" />
                    
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 Polhem.JsonRpc.Client --version 1.1.1
                    
#r "nuget: Polhem.JsonRpc.Client, 1.1.1"
                    
#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 Polhem.JsonRpc.Client@1.1.1
                    
#: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=Polhem.JsonRpc.Client&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Polhem.JsonRpc.Client&version=1.1.1
                    
Install as a Cake Tool

Polhem.JsonRpc.Client

A JSON-RPC 2.0 client on System.Text.Json: calls, notifications and batches over HTTP, with interceptors for rewriting parameters and results. It supports trimming and Native AOT, so it runs on iOS, Android and WebAssembly.

using var http = new HttpClient { BaseAddress = new Uri("https://example.com/api") };
var rpc = new JsonRpcConnector(new HttpTransport(http));

var added = await rpc.InvokeAsync<AddResponse>("Calculator.Add", new AddRequest { A = 1, B = 2 });

An error answer is thrown as JsonRpcErrorException. Under Native AOT, set JsonRpcClientOptions.SerializerOptions to options whose TypeInfoResolver is a source-generated JsonSerializerContext.

Documentation and samples: https://github.com/polhem-dev/polhem-jsonrpc

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 (2)

Showing the top 2 NuGet packages that depend on Polhem.JsonRpc.Client:

Package Downloads
Polhem.Api.Client

Connector for local or remote invocation of backend logic.

Polhem.JsonRpc.Payload.Client

Client half of Polhem.JsonRpc.Payload: PayloadConnector seals the parameters of each call into the payload envelope and opens its result, so an encrypted call is made like a plain one.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 0 10/5/2026
1.1.1 51 10/5/2026