Any to String#
This converter tries to transform any value into a string. This converter applies the .toString() javascript function if it is not converting an object, if it is an object it will have different behaviors. If it is converting an object of type:
-
DateTime: it will convert it to a string in the ISO 8601 format (
YYYY-MM-DDTHH:mm:ss.sssZ), using the javascript function .toISOString(); -
Error: it will return a Json string value with the elements of the error;
-
Map: it will transform it into an array of key value pairs and transform it into a string, using JSON.stringify(Array.from(value.entries())). Beware that this transformation will turn your map into an array;
-
Unspecified: It will use try to turn it into a string using the JSON.stringify(value);
Settings#
| Name | Type | Description |
|---|---|---|
| defaultValue | any | Value to output if the converter fails to convert the input value into a string |
