During this procedure, you apply a sample JSON or XML message
to the Write JSON input parameter. If you prefer, you can also use
a schema for this task.
About this task
Note: Because not all JSON messages contain a root node,
Studio, by default, adds a virtual root element to all JSON messages
during a write JSON activity. (Virtual nodes facilitate handling of
rootless messages in Studio). To determine if a root node is present,
view the message in the Configure panel. If the message does not contain
a root element, Studio will automatically generate one during the
write JSON activity and display it in the root element file. To remove
the root element, delete it from the Configure panel so the output
message matches the required structure.
Procedure
- Click Configure from the Checklist. The
Configure window is displayed.
- In the Configure window, copy the JSON or XML message into
the text area and click on Generate Map. If you're specifying
an XML schema to apply to the Write JSON input parameter do the following
additional steps: (a) In the Select XML Schema field, click the Select
XML Schema button to browse for the XML schema, then (b) select the
XML schema to parse against during run time and click OK.
- Specify how the data defined by the OutputJSON output parameter
is to be encoded:
- Select the Data is text-Needs no decoding or encoding option
if the data is text and does not require encoding.
- Select the Encode data using encoding type option
if outgoing data is binary data that requires encoding using the specified
encoding type.
- Set the encoding type using one of the following options:
- From the Encode data using encoding type list, select
one of the default encoding types.
- Click directly in the Encode data using encoding type
field and enter your encoding type.
- Click OK.