Write JSON activity configuration

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

  1. Click Configure from the Checklist. The Configure window is displayed.
  2. 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.
  3. Specify how the data defined by the OutputJSON output parameter is to be encoded:
    1. Select the Data is text-Needs no decoding or encoding option if the data is text and does not require encoding.
    2. Select the Encode data using encoding type option if outgoing data is binary data that requires encoding using the specified encoding type.
  4. Set the encoding type using one of the following options:
    1. From the Encode data using encoding type list, select one of the default encoding types.
    2. Click directly in the Encode data using encoding type field and enter your encoding type.
  5. Click OK.



Feedback | Notices


Timestamp icon Last updated: Thursday, December 17, 2015


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Write_json_Activity_conf.html