JSON parsing of regular expressions fails
search cancel

JSON parsing of regular expressions fails

book

Article ID: 381774

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

On the RA.Webservices_REST Agent, using a regular expression (=~), in JSONPath parsing of the response tab, results in an error.

For example, using the following JSONPath evoking a regular expression:

$..data[?(@.status =~ /1900|1899/ )]

... leads to the following error:

2024-10-30 11:40:07             Error from the execution of the query:
2024-10-30 11:40:07             ERROR Cannot execute query.
2024-10-30 11:40:07             java.lang.NumberFormatException: For input string: "~ /1900|1899/"
2024-10-30 11:40:07             Used script:
2024-10-30 11:40:07             $..data[?(@.status =~ /1900|1899/ )]

Environment

RA.Webservice_REST

Cause

This is a bug

Resolution

This issue is solved in RA.Webservice_REST v4.6.14 and higher