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.
Inheritance
System.Object
DataFlowSource<TOutput>
DataFlowExecutableSource<TOutput>
DataFlowStreamSource<TOutput>
JsonSource<TOutput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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
Name | Description |
---|---|
TOutput | Type of outgoing data. |
Examples
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");
Constructors
JsonSource()
Declaration
public JsonSource()
JsonSource(String)
Declaration
public JsonSource(string uri)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The source json file name or uri |
JsonSource(String, ResourceType)
Declaration
public JsonSource(string uri, ResourceType resourceType)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The source csv file name or uri |
ResourceType | resourceType | The type of resource for the uri (e.g. file or http) |
Properties
JsonSerializer
The Newtonsoft.Json.JsonSerializer used to deserialize the json into the used data type.
Declaration
public JsonSerializer JsonSerializer { get; set; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializer |
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
Type | Description |
---|---|
System.String |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CheckParameter()
CloseReader()
Declaration
protected override void CloseReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CloseReader()
InitReader()
Declaration
protected override void InitReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.InitReader()
ReadAllRecords()
Declaration
protected override void ReadAllRecords()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.ReadAllRecords()