Bug in Evaluate JSON Path Expression
search cancel

Bug in Evaluate JSON Path Expression

book

Article ID: 232869

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We are getting the JSON data from an external provider in this format:

{
    "locationName": null,
}

The evaluation fails with this value being all lower case.


If I test by making the payload "Null" it works


Having it in quotes work as well

Environment

Release : 10.0

Component :

Resolution

1. The behavior of Evaluate JSON Path Expression assertion when it fails to parse { "locationName": null } is a bug but it can't be fixed because that assertion uses outdated library. Customer should migrate to  Evaluate JSON Path Expression V2 assertion.

2. JSON is case-sensitive and null value is expected to be in lower case: https://www.json.org/json-en.html
So please make sure your 3rd party service is compliant with the JSON standard. Gateway is working as expected according to the JSON specification.