SmartPipe.Extensions.Json
2.2.0
See the version list below for details.
dotnet add package SmartPipe.Extensions.Json --version 2.2.0
NuGet\Install-Package SmartPipe.Extensions.Json -Version 2.2.0
<PackageReference Include="SmartPipe.Extensions.Json" Version="2.2.0" />
<PackageVersion Include="SmartPipe.Extensions.Json" Version="2.2.0" />
<PackageReference Include="SmartPipe.Extensions.Json" />
paket add SmartPipe.Extensions.Json --version 2.2.0
#r "nuget: SmartPipe.Extensions.Json, 2.2.0"
#:package SmartPipe.Extensions.Json@2.2.0
#addin nuget:?package=SmartPipe.Extensions.Json&version=2.2.0
#tool nuget:?package=SmartPipe.Extensions.Json&version=2.2.0
SmartPipe.Extensions.Json
System.Text.Json-based sources, sinks, transforms, and dead-letter persistence for SmartPipe.Core.
Installation
dotnet package add SmartPipe.Extensions.Json
Package graph
SmartPipe.Extensions.Json depends on SmartPipe.Core and
Microsoft.Extensions.Logging.Abstractions. It does not bring in Dapper,
Entity Framework Core, Mapster, CsvHelper, HTTP resilience, hosting,
health-check, or Newtonsoft.Json dependencies.
Components
JsonFileSource<T>JsonFileSink<T>JsonTransform<TInput,TOutput>DeadLetterSource<T>DeadLetterSink<T>JsonPipelineComponents,JsonPipelineDefinitionBuilder, andJsonPipelineDefinitionBuilderExtensions
The related JsonLinesDeadLetterSerializer<T> remains part of
SmartPipe.Core.
JSON backend
The package uses System.Text.Json from the .NET 10 shared framework, so an
additional System.Text.Json NuGet dependency is neither required nor pinned.
Newtonsoft.Json is not a dependency and is not selected at runtime.
Line-framed input uses the internal, bounded UTF-8 reader linked from
src/Shared/JsonFraming/Utf8LineRecordReader.cs. The reader is BCL-only and
knows only about LF/CRLF boundaries, BOM bytes, and the configured record-size
limit. JSON validation, path diagnostics, and invalid-record policy remain in
this package; the framer is not a public API or a separate package.
The framer, the internal source-generated metadata snapshot, and the
unframed-input limit stream live under src/Shared as compile-linked internal
source. SmartPipe.Extensions.Http.Json links the same files, so the HTTP
NDJSON and array readers enforce the same framing and limits. The package gains
no public helper and no friend-assembly coupling from this. Physical CSV/RFC
framing stays separate.
Trimming and NativeAOT
Reflection-based constructors are annotated for trimming and NativeAOT risk.
For trimmed or NativeAOT applications, use the overloads that accept
source-generated JsonTypeInfo<T> metadata.
File formats
Options-based sources and sinks select Array, Ndjson, or
BatchJsonLines. Sources can also use Auto; collection-valued payloads must
choose an explicit format because a leading array is ambiguous. Existing sink
constructors preserve the SmartPipe 2.1.1 default: append one array per flushed
line.
Reads are strict by default. MaxDepth defaults to 64 for reflection and
source-generated paths. Explicitly line-framed records (Ndjson,
BatchJsonLines) have a separate 16 MiB per-record limit
(MaxRecordSizeBytes); root arrays and auto-detected legacy top-level value
sequences use a 256 MiB unframed input limit (MaxUnframedInputSizeBytes).
SkipAndLog requires a logger and is supported only when the source is reading
independently line-framed records. JsonFileSource<T> defaults to Auto and
also accepts explicit Ndjson or BatchJsonLines; dead-letter Auto recovery
depends on whether it detects a framed stream rather than a root array.
Append mode preserves existing bytes. If a non-empty destination has no final LF, the sink inserts one before the next record; an existing partial row is not rewritten, and its later replay behavior is determined by the source format and invalid-record policy.
Injected append streams must be readable, seekable, and writable and are validated during initialization before any record is written. Boundary checks restore the incoming position, then writes append at the stream end. Success leaves the position at the new end; successful rollback restores the old end. Injected streams remain open on sink disposal, while path-owned streams are disposed.
DeadLetterSink<T> serializes through Core's IDeadLetterSerializer<T>.
Append destinations must also be writable. Failed writes roll back to
the pre-record checkpoint; if rollback itself fails, the error reports that the
destination may contain a partial record.
Concurrent or reentrant disposal calls share the same asynchronous completion, so the underlying stream is finalized once and every caller observes the same result.
Migration from SmartPipe.Extensions
The public namespaces remain unchanged. SmartPipe.Extensions 2.2.0 retains
type forwarders and a transitive dependency on this package so retained 2.x
source and binary consumers continue to resolve the moved types. New
applications should reference SmartPipe.Extensions.Json directly.
The forwarding dependency is the supported compatibility contract for the 2.x line; no bridge-removal release is promised.
| 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
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- SmartPipe.Core (>= 2.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SmartPipe.Extensions.Json:
| Package | Downloads |
|---|---|
|
SmartPipe.Extensions
Compatibility facade and convenience bundle for SmartPipe.Core and its runtime integration packages. New applications should reference specific SmartPipe.Extensions.* packages. Retained 2.1.2 APIs use type forwarding or the frozen legacy DI/Hosting/Health cluster; removed HTTP/Polly APIs require migration and recompilation. |
|
|
SmartPipe.Extensions.Http.Json
Source-generated JSON codecs for streaming SmartPipe.Core HTTP pipelines. |
GitHub repositories
This package is not used by any popular GitHub repositories.
2.2.0 preserves the 2.1.2 JSON identities and adds strict bounded NDJSON and dead-letter processing. Use source-generated JsonTypeInfo for trimming and NativeAOT paths.