Altova MapForce 2024 Enterprise Edition

JSON Component Settings

Home Prev Top Next

To change the settings of a JSON component, right-click the JSON component header, and then click Properties (alternatively, double-click the JSON component header).

mf_dlg_json_component_settings

JSON Component Settings dialog box

The available settings are as follows.

 

Component name

The component name is automatically generated when you create a component. However, you can change the name at any time. The component name can contain spaces and full stops. It may not contain slashes, backslashes, colons, double quotes, leading and trailing spaces. If you want to change the name of the component, be aware of the following:

 

If you intend to deploy the mapping to FlowForce Server, the component name must be unique.

It is recommended to use only characters that can be entered at the command line. National characters may have a different encoding in Windows and at the command line.

Schema file

Specifies the file name and path of the schema file.

 

To change the location of the file, click Browse and select the new file.

 

To edit the file in your JSON editor (for example, XMLSpy), click Edit.

Input JSON File

This text box is meaningful only if the mapping reads data from a JSON file. It specifies the file name and path of the input JSON instance.

 

To set or change the location of the file, click Browse and select the new file. You can also enter a relative path if the Save all file paths relative to MFD file check box is selected (see below).

 

To edit the file in your JSON editor (for example, XMLSpy), click Edit.

Output JSON File

This text box is meaningful only if the mapping writes data to a JSON file. It specifies the file name and path where the target JSON instance will be created when the mapping is executed by MapForce Server.

 

This is also the default location when you save the output from the Output pane.

 

To change the location of the file, click Browse and select the new file. You can also enter a relative path if the Save all file paths relative to MFD file check box is selected (see below).

 

To edit the file in your JSON editor (for example, XMLSpy), click Edit.

Pretty print output

Reformats your JSON document when the mapping is executed, in order to give it a structured display. Each child node is offset from its parent by a single tab character.

Encoding

Allows you specify the following settings of the output instance file:

 

Encoding name

Byte order

Whether the byte order mark (BOM) character should be included.

 

JSON files are expected to have UTF encoding (see https://tools.ietf.org/html/rfc7159#section-8.1). Other encodings are considered non-standard.

Use JSON5

Select this check box if the input JSON file from which the component reads data uses JSON5 syntax.

 

In a target component, selecting the check box instructs MapForce to create a .json5 file where object keys are unquoted if they are valid ECMAScript5 identifiers. See also JSON5 Support.

JSON Lines

Select this check box if you would like to read data from a source file in JSON Lines format, or if you want to write data to a target file in JSON Lines format. For further information, see JSON Lines.

Save all file paths relative to MFD file

When this option is enabled, MapForce saves the file paths displayed on the Component Settings dialog box relative to the location of the MapForce Design (.mfd) file. This setting affects the following files:

 

The JSON schema file

The JSON input file

The JSON output file

 

See also Using Relative Paths on a Component.

© 2017-2023 Altova GmbH