document | Object. The document (IData object) to be converted to a JSON string. |
jsonData | Object. JSON content in a string or an input stream to convert to a document (IData object). |
documentTypeName | String. Optional. If specified, the transformation from the JSON data to Document (IData) is based on the document type. Any deviations from the provided document result in errors. documentTypeName accepts all kinds of document types. When this parameter is provided, Integration Server ignores the following parameters: decodeIntegerAs decodeDecimalAs decodeBooleanAs This parameter must have the fully qualified name of the document type against which the JSON content is validated. For example: data:employeeData |
decodeIntegerAs | String. Optional. Converts all the integer values in jsonData to either String, Integer, Long, or BigInteger Java wrapper type. Depending on the data type to which you want to convert the integer values in jsonData, set to: String to convert all the integer values to String. This is the default. Integer to convert all the integer values to Integer. Long to convert all the integer values to Long. BigInteger to convert all the integer values to BigInteger. Auto to check the Java wrapper type range in which the input value fits and convert the value to the appropriate wrapper type. If there is no user selection and documentTypeName is not specified, then by default, converts the value to String. Note: If you select the datatype as Integer and the JSON data contains a value outside the range of Integer, the service fails with an error. |
decodeDecimalAs | String. Optional. Converts all the decimal values in jsonData to either String, Float, Double, or BigDecimal Java wrapper type. Depending on the data type to which you want to convert the decimal values in jsonData, set to: String to convert all the decimal values to String. This is the default. Float to convert all the decimal values to Float. Double to convert all the decimal values to Double. BigDecimalto convert all the decimal values to BigDecimal. Auto to check the Java wrapper type range in which the input value fits and convert the value to the appropriate wrapper type. If there is no user selection and documentTypeName is not specified, then by default, converts the value to String. Note: If you select the datatype as Float and the JSON data contains a value outside the range of Float, the service fails with an error. |
decodeBooleanAs | String Optional. Converts all the boolean values in jsonData to String or Boolean. Depending on the value of the variable in jsonData, set to: String to convert all the boolean values to String. This is the default. Boolean to convert all the boolean values to Boolean. If there is no user selection and documentTypeName is not specified, then by default converts the value to String. |
decodeNullRootAsEmpty | String. Optional. Converts a null value at the root that Integration Server retrieves from JSON content to IData. Depending on the data type to which you want to convert the null values in jsonData, set to: true to convert the null value in the JSON data to an empty IData. false to convert the null value in the JSON data to an IData with $rootValue. This is the default. |
unescapeSpecialChars | String. Optional. Controls whether Integration Server unescapes the special characters '\n', '\r', '\t', '\b', '\f', '\\', '\"' while parsing JSON documents. Set to: true to unescape these special characters (for example, '\n' is replaced with new line; similarly, other characters are also replaced) in the output document. This is the default. false to keep these characters as is in the output document. The behavior applies to both values and keys. Note: The unescapeSpecialChars parameter overrides the value specified by the watt.server.json.decode.unescapeSpecialChars server configuration parameter. If no value is supplied for unescapeSpecialChars, Integration Server uses the value specified in the watt.server.json.decode.unescapeSpecialChars parameter. For more information about watt.server.json.decode.unescapeSpecialChars, see IBM webMethods Integration Server Administrator’s Guide. |
document | Document. Document (IData object) resulting from the conversion of jsonData. |
Input | DocumentTypeName | Output |
{"age" : “12345”} | age: Integer age: Long age: BigInteger | Empty document (As there are no matches, the service ignores the input variable and generates an empty document.) |
{"updatedDate" : “22/01/01” } | updatedDate: String updatedDate: Date | String (Selects the first suitable match.) |
{"number": [12 , 22 ,23 ]} | number: Integer array number: String array number: Object array | Integer array |