Data types
This table describes how to use the data types supported by Data Shaping Expression Language.
Type | Syntax | Examples | Corresponding Java class |
---|---|---|---|
String | Strings should be delimited by single or double quotes. If you want to
use quotes in your string, you can escape them with \ or use
different quotes than the ones used to delimit the string. You can also use the
following sequences to escape: \n, \r,
\f, \t, \b,
\/, \' in case of single quoted string,
and \" in case of double quoted string. CR, NL, and LF are not allowed in a quoted string. |
|
java.lang.string |
Integer | Integers are whole numbers, positive, or negative. |
|
java.lang.Integer |
Long | Long values should be followed by l or L to be interpreted as long. Otherwise they are interpreted as integers. |
|
java.lang.Long |
Double | Double values should written in scientific notation or be followed by d or D to be interpreted as double. Otherwise they are interpreted as decimals. |
|
java.lang.Double |
Float | Float values can be written in scientific notation. They should be followed by f or F to be interpreted as float. Otherwise they are interpreted as double if they contain scientific notation, or decimal if they do not. |
|
java.lang.Float |
Decimal | Decimals are numbers with a decimal point |
|
java.math.BigDecimal |
Boolean | Booleans are case insensitive. |
|
java.lang.Boolean |
Bytes | Bytes should be written with hexadecimal characters in lowercase or uppercase, prefixed by 0x or 0X. |
|
byte[] |
Date | Dates should be delimited by single or double quotes. They are composed of a year, month and day in the format yyyyMMdd, yyyy/MM/dd or yyyy-MM-dd. To evaluate them as dates instead of strings, you need to use a toDate function. See Data type functions. |
|
java.time.LocalDate |
Time | Times should be delimited by single or double quotes. They are composed of hours and minutes, and can also contain seconds, milliseconds, and a timezone. The format should be HH:mm, hh:mm:ss or HH:mm:ss.SSS To evaluate them as times instead of strings, you need to use a toTime function. |
|
|
Datetime | Datetimes should be delimited by single or double quotes. They are composed of a date and a time, with an optional timezone. The format should follow the international standard ISO 8601. To evaluate them as datetimes instead of strings, you need to use a toDateTime function. |
|
|