Integration Cloud 7.0.0 | Built-In Services | Built-In Services | documentToJSONString
 
documentToJSONString
Converts a document to a JSON string.
Input Parameters
document
Document. The document to be converted to a JSON string.
prettyPrint
String. Formats the jsonString output parameter for human readability by adding carriage returns and indentation to the JSON content. Set to:
*true to format the jsonString output field for human readability
*false to leave the jsonString output field in its unformed state
The service will not add any additional carriage returns or indentation to the JSON content.
Output Parameters
jsonString
Object. JSON string resulting from the conversion of a document.
Usage Notes
When creating a JSON text with documentToJSONString, if the document input parameter contains a $rootArray key with an array as its value, Integration Cloud discards the $rootArray name and transforms the array value into a JSON array. The resulting JSON text will contain only an unnamed array. $rootArray and key/value pairs cannot both appear in the input document. $rootArray indicates that the generated JSON text should consist only of an unnamed array. Combining this with additional key/value pairs leads to unpredictable results.