Jakar.Json.Http
10.2.0
dotnet add package Jakar.Json.Http --version 10.2.0
NuGet\Install-Package Jakar.Json.Http -Version 10.2.0
<PackageReference Include="Jakar.Json.Http" Version="10.2.0" />
<PackageVersion Include="Jakar.Json.Http" Version="10.2.0" />
<PackageReference Include="Jakar.Json.Http" />
paket add Jakar.Json.Http --version 10.2.0
#r "nuget: Jakar.Json.Http, 10.2.0"
#:package Jakar.Json.Http@10.2.0
#addin nuget:?package=Jakar.Json.Http&version=10.2.0
#tool nuget:?package=Jakar.Json.Http&version=10.2.0
Jakar.Json.Http
Jakar.Json for HttpClient, in the shape of System.Net.Http.Json.
Order? order = await client.GetFromJakarJsonAsync<Order>("orders/7");
using HttpResponseMessage response = await client.PostAsJakarJsonAsync("orders", order);
Order? saved = await response.Content.ReadFromJakarJsonAsync<Order>();
| Method | Does |
|---|---|
GetFromJakarJsonAsync<T> / DeleteFromJakarJsonAsync<T> |
Sends the request, throws HttpRequestException on a non-success status, and reads the body. |
PostAsJakarJsonAsync / PutAsJakarJsonAsync / PatchAsJakarJsonAsync |
Sends the value as a Jakar.Json body and returns the response. |
content.ReadFromJakarJsonAsync<T> |
Reads any response's body. |
JakarJsonContent.Create(value) |
The HttpContent itself, for HttpRequestMessage and other APIs. |
- Types:
[JsonModel]types, and arrays, lists and collection interfaces of them. - Request bodies are written from a pooled buffer, as
application/json; charset=utf-8. LikeJsonContent, the length isn't known in advance. - Response bodies are streamed and parsed in one pass. Bodies in another charset (UTF-16, Latin-1, ...) are transcoded first. A
nullbody reads asdefault. - Errors: malformed JSON throws
JsonReadException, which derives fromJsonException.
For Refit, RestSharp or Flurl, see Jakar.Json.Refit, Jakar.Json.RestSharp and Jakar.Json.Flurl.
| 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
- Jakar.Json (>= 10.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Jakar.Json.Http:
| Package | Downloads |
|---|---|
|
Jakar.Json.Refit
Jakar.Json as Refit's content serializer: request and response bodies of [JsonModel] types (and collections of them) are written and read by Jakar.Json; other types go to a fallback (Refit's System.Text.Json serializer by default). |
GitHub repositories
This package is not used by any popular GitHub repositories.
10.2.0: built against Jakar.Json 10.2.0, whose writers take a ref TWriter; 10.1.0 calls the removed IBufferWriter overloads and throws MissingMethodException with Jakar.Json 10.2.0. 10.1.0: initial release.