Forum Discussion

waynemmn's avatar
waynemmn
Contributor
9 years ago
Solved

JSON Path expression not working on project I updated to 1.6.0

Hello,  I have a JSONPath Expression that worked just fine in SoapUI NG 1.3.1 but today I updated to 1.6.0 and now it fails.    My RAW JSON looks like this.    { "action" : "get", "status" :...
  • AntonE's avatar
    9 years ago

    We upgraded our JSON Path library, and it turned out that its developers decided the syntax you use here had been a bug in older releases. As they put it, "The problem is that from a JSONPath perspective it does not make sense. The last part [0] does not correspond to a path in the document." I guess they mean that the "alias" tag here is a leaf in the document tree, and you should not use array indices after leaves.

     

    Nevertheless, we partially restored the old behavior in Ready! API 1.5.0 (and 1.6.0, of course), but for now you should use your JSON Path without the dot before [0]:

     

    $.entities[?(@.alias==${Groovy Script#result})].alias[0]