Class JsonSource<TOutput>

Reads data from a json source. This can be any http resource or a file. By default, data is pulled via httpclient. Use the ResourceType property to read data from a file.

Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.DataFlow.Connectors
Assembly: ETLBox.Json.dll
Syntax
    public class JsonSource<TOutput> : DataFlowStreamSource<TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, IDataFlowExecutableSource, IDataFlowStreamSource
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

Constructors

JsonSource()

Declaration
    public JsonSource()
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

JsonSource(string, ResourceType)

Declaration
    public JsonSource(string uri, ResourceType resourceType)
Parameters
TypeNameDescription
stringuri

The source json file name or uri

ResourceTyperesourceType

Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage)

JsonSource(string)

Declaration
    public JsonSource(string uri)
Parameters
TypeNameDescription
stringuri

The source json file name or uri

Properties

JsonSerializer

The Newtonsoft.Json.JsonSerializer used to deserialize the json into the used data type.

Declaration
    public JsonSerializer JsonSerializer { get; set; }
Property Value
TypeDescription
Newtonsoft.Json.JsonSerializer

PropertyNameOfDataArray

By default, the first array which is encountered in the json is autmatically read. If you want a different behaviour set this to the property name of the array which you like to process.

Declaration
    public string PropertyNameOfDataArray { get; set; }
Property Value
TypeDescription
string

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
string
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CheckParameter()
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

CloseReader()

Declaration
    protected override void CloseReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CloseReader()
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

InitReader()

Declaration
    protected override void InitReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.InitReader()
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.ReadAllRecords()
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");

Implements