Class JsonDestination<TInput>
A Json destination defines a json file where data from the flow is inserted.
Inheritance
object
DataFlowDestination<TInput>
DataFlowStreamDestination<TInput>
JsonDestination<TInput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.Json
Assembly: ETLBox.Json.dll
Syntax
public class JsonDestination<TInput> : DataFlowStreamDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowStreamDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowStreamDestination, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
TInput | Type of ingoing data. |
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive
Constructors
JsonDestination()
Declaration
public JsonDestination()
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive
JsonDestination(string, ResourceType)
Declaration
public JsonDestination(string uri, ResourceType resourceType)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The source csv file name or uri |
ResourceType | resourceType | The type of resource for the uri (e.g. file or http) |
JsonDestination(string)
Declaration
public JsonDestination(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The source csv file name or uri |
Properties
HttpContentType
The content type used when sending the http request content.
Declaration
public override string HttpContentType { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.HttpContentType
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 |
---|---|
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 |
---|---|
string |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.CheckParameter()
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive
CloseStream()
Declaration
protected override void CloseStream()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.CloseStream()
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive
InitStream()
Declaration
protected override void InitStream()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.InitStream()
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive
WriteIntoStream(TInput)
Declaration
protected override void WriteIntoStream(TInput data)
Parameters
Type | Name | Description |
---|---|---|
TInput | data |
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.WriteIntoStream(TInput)
Examples
JsonDestination<MyRow> dest = new JsonDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive