Click or drag to resize

OrchestratorConfigXmlJsonOutputSettings Property

A string containing comma separated parameters for writing XML or JSON or UnboundJSONdata on output. Each such parameter is a key-value pair with a pipe symbol (|) separating the key and the value. The parameters define the shape of data to write. There are differences (explained below) in their interpretation in case of XML vs JSON vs UnboundJSON. The following keys can be used:
  • CollectionNode - "xpath" defining the collection of clusters (or records if the ClusterNode parameter is absent). If this parameter is absent for XML, then output will contain XML fragment where each root constitutes a record or a cluster. In case of JSON, absent or empty value generally means an array instead of an object. Ignored in case of UnboundJSON.
  • ClusterNode - "xpath" to the cluster node within the collection node. Records with the same cluster number will be placed inside the same cluster node. If this parameter is absent, then all records will be placed directly in the collection node regardless of their cluster number. Ignored in case of UnboundJSON.
  • RecordNode - "xpath" to the record node within the cluster node (or the collection node if the cluster node is empty). In case of XML this parameter is required; if absent or empty, a default value of "__record__" will be assumed. In case of JSON this parameter can be empty (or even absent if CollectionNode and ClusterNode are also empty - special case to output multiple objects containing records). Ignored in case of UnboundJSON.
  • AttributeFields - XML only, ignored in case of JSON or UnboundJSON. A semi-colon separated list of field names (item keys) to be projected as attributes of the record node (and not inner nodes). In addition, all fields with names starting with @ will be projected as attributes of the record node (the @ will not be removed from the attribute name).
  • IndentChars - A string to use when indenting, e.g. "\t" or " ". This parameter allows to "pretty-print" the output. When absent, no indenting takes place. Note that in case of JSON or UnboundJSON, the only sensible value for this parameter contains a string containg a single character (possibly repeated, e.g. " " or "\t"; if different characters are used (e.g. " \t" i.e. a space and a tab), then the output may not be as expected.
  • NewLineChars - XML only, ignored in case of JSON or UnboundJSON. Characters to use for line breaks (to "pretty-print" the XML output).
  • ProduceStandaloneObjects - Only applicable to UnboundJSON output: if present, causes Data Conveyer to produce successive, standalone objects (records) or , if ProduceClusters is also present, arrays (clusters) - technically not valid JSON, but commonly used; if absent, a JSON array is produced where each record (or cluster ProduceClusters is also present) becomes an array element. Ignored in case of XML or JSON.
  • ProduceClusters - Only applicable to UnboundJSON output: if present, causes all records of a clusted to be enclosed in arrays; if absent, clusters are ignored on output. Ignored in case of XML or JSON.
  • SkipColumnPresorting - Only applicable to UnboundJSON output: if present, the fields are processed in order they appear in the records (better performance, but JSON hierarchy may be off); if absent, fields are grouped by segments (dot notation) to force proper JSON nesting hierarchy. Ignored in case of XML or JSON.
Note Note

"xpath" in any of the node parameters is a simplified version of the xpath syntax. It is always relative to the containing node (no need for ./).

In case of JSON, it contains names of the nodes (nested in the node hierarchy) separated by /. Empty nodes are allowed, in which case the output at a given hierarchy level consist of an array instead of an object containing an array. Special case: when CollectionNode, ClusterNode and RecordNode are all absent, then output will consist of multiple objects containing records.

In case of XML, empty nodes are not allowed. In addition, node names must be valid XML names (notes that certain characters, such as spaces, are not allowed in XML even though they are allowed in JSON). Attributes can be specified, but must include both name and value. In such cases, an attribute will be added to the node on output. Care needs to be taken in case of attributes of the record node to avoid name duplicates with the records fields (when AttributeFields parameter is used).

Example 1:"CollectionNode|Members,RecordNode|Member,IndentChars| "(XML or JSON)

Example 2:"RecordNode|Member,IndentChars|\t"(XML or JSON)

Example 3:"CollectionNode|Root/Members,ClusterNode|Group/Subgroup/Family,RecordNode|Data/Member"(XML or JSON)

Example 4:"RecordNode|,IndentChars| "(JSON only - an array of object containing records)

Example 5:"ClusterNode|,RecordNode|"(JSON only - an array of arrays=clusters of objects=records)

Example 6:""(JSON only - all node parameters absent is a special case that results in multiple objects containing records)

Example 7:"CollectionNode|Root/Members[@region=North],ClusterNode|Group[@id=2][@zone=\"\"]/Family,RecordNode|Data/Member[@class=\"main\"],AttributeFields|ID;zone"(XML only)

Example 8:"ProduceStandaloneObjects,SkipColumnPresorting,IndentChars| "(UnboundJSON only)

This configuration setting is only applicable when OutputDataKind value is XML, JSON or UnboundJSON.

Namespace:  Mavidian.DataConveyer.Orchestrators
Assembly:  DataConveyer (in DataConveyer.dll) Version: 3.4.6+1324144ff7
Syntax
public string XmlJsonOutputSettings { get; set; }

Property Value

Type: String
See Also