Class EtlPipelineJsonSourceExtensions
Class-named JSON source factories for the fluent Wolfgang.Etl.Abstractions.EtlPipeline chain. Each factory
constructs the matching extractor and seeds the pipeline, enabling
EtlPipeline.Create().JsonLineExtractor<Person>("people.jsonl").
public static class EtlPipelineJsonSourceExtensions
- Inheritance
-
EtlPipelineJsonSourceExtensions
- Inherited Members
Remarks
Path-based factories own the file stream they open and dispose it when the pipeline finishes enumerating. Stream-based factories do not dispose — the caller owns the stream's lifetime.
Methods
JsonLineExtractor<T>(EtlPipeline, Stream, JsonSerializerOptions?)
Starts a pipeline that reads JSONL records from an existing stream. The caller owns the stream.
[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonLineExtractor<T>(this EtlPipeline pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
streamStreamThe stream to read JSONL from.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorstreamis null.
JsonLineExtractor<T>(EtlPipeline, string, JsonSerializerOptions?)
Starts a pipeline that reads JSONL (JSON Lines / NDJSON) records from a file.
[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonLineExtractor<T>(this EtlPipeline pipeline, string path, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
pathstringThe path of the JSONL file to read.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.
JsonSingleStreamExtractor<T>(EtlPipeline, Stream, JsonSerializerOptions?)
Starts a pipeline that reads records from a single JSON array stream. The caller owns the stream.
[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonSingleStreamExtractor<T>(this EtlPipeline pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
streamStreamThe stream to read the JSON array from.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorstreamis null.
JsonSingleStreamExtractor<T>(EtlPipeline, string, JsonSerializerOptions?)
Starts a pipeline that reads records from a single JSON array file.
[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonSingleStreamExtractor<T>(this EtlPipeline pipeline, string path, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
pathstringThe path of the JSON array file to read.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.