Webservice Rest 4.6.11 and superior do not contain brackets on the response for empty results
search cancel

Webservice Rest 4.6.11 and superior do not contain brackets on the response for empty results

book

Article ID: 374557

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

The RA Webservice Rest 4.6.10 (and Response Expression tester) when requested something that should provide an empty result used to provide as Result empty brackets [] , see image below:


On the other hand, in later versions 4.6.11,4.6.12, 4.6.13 the result is completely empty:

This behavior corresponds with what we obtain in jsonpath.com where we obtain "No match":

Why has the behavior changed in between versions and is it the correct behavior the current one (versions 4.6.11 and superior)?

 

Environment

 RA Webservice Rest Agent on version 4.6.11 and superior.

Cause

Defect on previous versions (4.6.10 and inferior) as there was no official standard for jsonpath.

The first official RFC for jsonpath was published in February 2024: RFC9535

Hence, there are (or were) a lot of different implementations of jsonpath syntax.

Resolution

The current and expected behavior is the one observed from version 4.6.11 and superior of the RA Webservice Rest Agent as the library jsonpath has been upgraded on this version and is now complying with the official RFC for jsonpath RFC9535

When no results should be displayed, the result should be empty (not including any empty brackets []).

Additional Information

The documentation has been updated with this note:

Important !
Always test your JSONPath expressions against the Event Engine before putting them in production. JSONPath Expressions created in external tools might not work as expected because the common standard for the JSONPath query syntax was first finalized in early 2024 - RFC9535.