Juner.Http.Sequence
1.0.0-preview-2
This is a prerelease version of Juner.Http.Sequence.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Juner.Http.Sequence --version 1.0.0-preview-2
NuGet\Install-Package Juner.Http.Sequence -Version 1.0.0-preview-2
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="Juner.Http.Sequence" Version="1.0.0-preview-2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Juner.Http.Sequence" Version="1.0.0-preview-2" />
<PackageReference Include="Juner.Http.Sequence" />
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 Juner.Http.Sequence --version 1.0.0-preview-2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Juner.Http.Sequence, 1.0.0-preview-2"
#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 Juner.Http.Sequence@1.0.0-preview-2
#: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=Juner.Http.Sequence&version=1.0.0-preview-2&prerelease
#tool nuget:?package=Juner.Http.Sequence&version=1.0.0-preview-2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Juner.Http.Sequence
Streaming JSON sequence support for HttpClient and HttpContent.
This library provides seamless integration between Juner.Sequence and HTTP APIs, enabling efficient streaming of JSON data using IAsyncEnumerable<T>.
📦 Package
Juner.Http.Sequence
🚀 Features
- 🌐
HttpClientintegration for streaming JSON - 🔄
IAsyncEnumerable<T>support for request and response - 🧩 Supports:
- NDJSON (
application/x-ndjson) - JSON Lines (
application/jsonl) - JSON Sequence (
application/json-seq)
- NDJSON (
- 🛡️ AOT-friendly via
JsonTypeInfo<T> - ⚡ Minimal overhead, fully streaming
✨ Quick Example
Send streaming request (NDJSON)
var request = new HttpRequestMessage(HttpMethod.Post, url)
.WithNdJsonContent(source, MyJsonContext.Default.MyType);
var response = await httpClient.SendAsync(request);
Receive streaming response
await foreach (var item in response.Content.ReadJsonLinesAsyncEnumerable<MyType>(
MyJsonContext.Default.MyType))
{
Console.WriteLine(item);
}
🧠 API Design
✅ AOT-safe (recommended)
JsonTypeInfo<T>
- No reflection
- Fully compatible with Native AOT
- Best performance
⚠️ Convenience APIs
JsonSerializerOptions.Default
- Easier to use
- Uses default metadata resolution (
TypeInfoResolver) - May rely on reflection
- Not guaranteed to be AOT-safe
👉 Prefer JsonTypeInfo<T> for AOT scenarios
🔧 Writing (Request)
request.WithSequenceContent(
source,
MyJsonContext.Default.MyType,
SequenceSerializerOptions.JsonLines,
"application/jsonl");
Shortcuts
request.WithJsonSequenceContent(source, typeInfo);
request.WithJsonLinesContent(source, typeInfo);
request.WithNdJsonContent(source, typeInfo);
🔧 Reading (Response)
await foreach (var item in response.Content.ReadSequenceEnumerable<T>(
typeInfo,
SequenceSerializerOptions.JsonLines))
{
// ...
}
Shortcuts
response.Content.ReadJsonSequenceAsyncEnumerable<T>(typeInfo);
response.Content.ReadJsonLinesAsyncEnumerable<T>(typeInfo);
🧩 Supported Formats
| Format | Content-Type |
|---|---|
| NDJSON | application/x-ndjson |
| JSON Lines | application/jsonl |
| JSON Sequence | application/json-seq |
🔗 Relationship
Juner.Sequence
↓
Juner.Http.Sequence
- Depends on
Juner.Sequence - Adds HTTP integration layer
- No ASP.NET Core dependency
📌 When to use
Use this package when:
- You need to stream large JSON datasets over HTTP
- You want
HttpClientto work withIAsyncEnumerable<T> - You are working with NDJSON / JSON Lines APIs
- You want AOT-friendly serialization over HTTP
📄 License
MIT
🔗 Links
🙌 Contributions
Issues and PRs are welcome!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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.
-
net10.0
- Juner.Sequence (>= 1.0.0-preview-2)
-
net7.0
- Juner.Sequence (>= 1.0.0-preview-2)
-
net8.0
- Juner.Sequence (>= 1.0.0-preview-2)
-
net9.0
- Juner.Sequence (>= 1.0.0-preview-2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 106 | 3/30/2026 |
| 1.0.0-preview-2 | 95 | 3/26/2026 |