Property reference expressions

Property reference expressions are the most common expression pattern to refer to a JSON object property using dotted syntax, object.property1, or map access syntax, object[property].

Any property that begins with a letter and only contains letters, numbers or underscores can be accessed using dot notation or map access syntax, for example:

  • user.accountId
  • user.name.given
  • user['accountId']
  • user['name']['given']

If a property contains a character other than the ones mentioned previously, such as a hyphen or dollar sign, it can only be accessed using the map access syntax, for example user.name['full-name'] or providerAttributes['amountIn$'].

Literal expressions

PingOne supports literal expressions in the form of strings, numeric values, boolean, and null.

Strings are delimited by single quotation marks. To put a single quotation mark itself in a string, use two single quotation mark characters around it. For example, '''string''' returns 'string'.

Numeric literals used directly in expressions must adhere to Java standards, such as adhering to min and max limits and using l or L for long literals. Numeric literals are also subject to the Java floating point rounding issues.

Expression type Example

String in double quotes

"Hello"

String in single quotes

'Hello', '''Hello'''

Numbers

1, 8.57, 34533535454345L

Boolean

true or false

String concatenation

You can use the + operator to concatenate values. You must include a leading and trailing space around the operator.

For example, user.name.family + ', ' + user.name.given or 'Hi' + user.name.given.

Note:

Because it's missing a leading space, 'Hi'+ user.name.given will return an error.