Suave.Json
3.6.0
See the version list below for details.
dotnet add package Suave.Json --version 3.6.0
NuGet\Install-Package Suave.Json -Version 3.6.0
<PackageReference Include="Suave.Json" Version="3.6.0" />
<PackageVersion Include="Suave.Json" Version="3.6.0" />
<PackageReference Include="Suave.Json" />
paket add Suave.Json --version 3.6.0
#r "nuget: Suave.Json, 3.6.0"
#:package Suave.Json@3.6.0
#addin nuget:?package=Suave.Json&version=3.6.0
#tool nuget:?package=Suave.Json&version=3.6.0
Suave.Json provides a small JSON serialization layer for Suave, backed by DataContractJsonSerializer. This package relies on runtime reflection and is NOT compatible with .NET Native AOT.
| 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
- FSharp.Core (>= 10.0.102)
- Suave (>= 3.2.0 && < 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Keep-alive performance: allocations per request fall from ≈5.7 KB to ≈1.24 KB for a routed empty response. In a same-host Linux comparison against ASP.NET Core Minimal API, Suave is now ahead at 256 connections and within ≈5% at 64 (#862, #864):
the connection's request loop waits for a complete request head, then parses the request line and headers synchronously; fragmented, oversized (beyond the 8 KiB line buffer), non-HTTP/1.x and body-carrying requests continue on the streaming parser
a request whose parsing, web part and response complete synchronously allocates no `Task`; `processRequest` and `run` keep their `Task` signatures
TCP and HTTPS reads and web part executions complete through reusable per-connection completion sources instead of a `task { }` wrapper and `Async.StartImmediateAsTask` per request; web part errors are recovered there with the same semantics as `async.TryWith`
reads no longer register on the server's cancellation token individually: each connection registers once and is shut down when the server stops, which also ends a pending read
no error message allocations for absent request headers, h2c checks only for `Upgrade: h2c` requests, allocation-free `Content-Length` formatting, status line and ASCII response headers written without task state or `ToLowerInvariant`, no URL decoding of paths without escapes, and a single exact-route lookup in `Router`
New `HttpReader` members (`requestHeadReady`, `receive`, `commitReceived`, `tryReadRequestLineBuffered`, `tryReadHeadersBuffered`) used by the request loop (#862)
Request header names are matched with ordinal case-insensitive comparison; names with invalid Unicode no longer match through linguistic equivalence (#862)
Add `Globals.messageWriter` to redirect or silence Suave's own console messages (startup banner, "Stopping TCP server", websocket disconnects); the test suite uses it to avoid a Console lock deadlock with Expecto that caused intermittent hangs (#863)
Evict obsolete compressed artifacts: a recompressed resource's superseded copy is now deleted as part of the atomic cache swap, and the `_temporary_compressed_files` folder is swept - age- and count-bounded, see `Compression.cleanupFolder` - on server startup and shutdown (#655)
Cached compressed copies that have gone missing from disk are treated as a cache miss instead of failing the request
Benchmarks: a Minimal API comparison server, balanced comparison and profiling scripts, and an exact per-request allocation probe; see `benchmarks/HTTP_COMPARISON.md` (#862)