Forum Discussion

Ton646's avatar
Ton646
Occasional Contributor
9 years ago

[Bug?] Autogenerated json assert on content does not work if json element has a . in the name

 

I think this is a fairly straightforward bug, when I right click on some json content (sample below with data redacted for privacy) and select 'assert on content' it auto generates a jsonpath assert but immediately throws an 'invalid jsonpath' error.  It seems the . in the json element is throwing things off.

 

Here is the json child element sample (the structure is similar to data/parent/metadata/place.ctry)

              "place.ctry": "Canada"

 

The assert being generated is:

$.data[0].parent.metadata.place.ctry

 

But that implies .ctry is a sub element to place, not one element.

 

Regards,

Ton Vlaming

Ps. This is from readyApi 1.4.1

6 Replies

  • Ton646's avatar
    Ton646
    Occasional Contributor

    Forgot to mention that the simple solution would be to change it to:

     

    $.data[0].parent.metadata.[place.ctry]

     

    Did that manually and it appears to work fine.

    • Ton646's avatar
      Ton646
      Occasional Contributor

      Hi Tanya,

       

      While I understand your question and it is certainly not unreasonable, I am afraid I am not able to do that - we cannot just upgrade readyAPI from a known stable version in our work environment as we need to use it daily.  I respectfully suggest forwarding this bug to your maintenance department so they can assess and try to reproduce it?  Or is there a more appropriate way for me to submit a bug report than this forum? If so - my apologies and could you let me know what that is? :)

       

      Regards,

      Ton

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Ton,

         

        You can submit this behavior to our Support Team - http://support.smartbear.com/product-list/

        However, as a rule, our R&D Team prepares patches for the latest product version. It’s unlikely that they will create a patch for v. 1.3.

        BTW, v.1.3 and v.1.5 can be installed side-by-side on one computer.