Title here
Summary here
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.
public class JsonSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Name | Description |
---|---|
TOutput | Type of outgoing data. |
JsonSource<POCO> source = new JsonSource<POCO>("https://jsonplaceholder.typicode.com/todos");
public JsonSource()
public JsonSource(string uri)
Type | Name | Description |
---|---|---|
string | uri | The source json file name or uri |
public JsonSource(string uri, ResourceType resourceType)
Type | Name | Description |
---|---|---|
string | uri | The source json file name or uri |
ResourceType | resourceType | Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage) |
The Newtonsoft.Json.JsonSerializer used to deserialize the json into the used data type.
public JsonSerializer JsonSerializer { get; set; }
Type | Description |
---|---|
JsonSerializer |
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.
public string PropertyNameOfDataArray { get; set; }
Type | Description |
---|---|
string |
protected override void CheckParameter()
protected override void CloseReader()
protected override void InitReader()
protected override void ReadAllRecords()