Sometimes the JSON response does not wrap as a single document. For example, the JSON response could be:
REST data sources retrieve data from a web service in either JSON or XML format. If the data can be extracted into tabular format, you must use an XSL transformer in order to do this. Here are basic instructions:
Upgrade Studio to at least the 6.2.3.00.22 patch. This provides you new functionality in order to Design by Example, which makes it easier to obtain the schema for the Extensible Stylesheet Language Transformations (XSLT) procedure to use in order to map the JSON output to tabular output.
In Studio, configure its XML text size to a large value like 50,000. This is important because later, when you click Design by Example, it breaks if the returned XML exceeds this size limit. If you are in a situation where you cannot increase this setting in Studio, consider the use of different input criteria in order to reduce the size of the returned XML.
You can do this step when you create the data source, or after the data source is created. When you create the REST data source, check the JSON Format check box.
If your JSON structure is not wrapped in a top element, CIS can add a wrapper so that the XML created from the JSON response is properly formatted into legal XML. If you do not know whether the response is wrapped, you can add the wrapper and evaluate whether you need this later. This is set with the Wrapper of JSON Bare Response field, which sets the root node for the JSON > XML output.
Select one of the Operations added in the Operations section:
Click Design by Example in the Header/Body Parameters section. If you just added this operation, you might have to close the REST data source panel and re-open it in order to make this button active.
Choose the top-level element of your JSON response and click OK.
Give the Parameter a name and click Save.
This creates an XML Schema Definition Set that appears in your data source resources.
This also transforms the JSON output to XML so that the XSL transformer can process it. Open the operation and examine the output structure. It shows you the structure that you use in the XSLT procedure.
Execute the operation. The JSON output transforms into XML.