I have a scenario that reads a json field from a file and compares it to another json field. When I do the match, it says the field from the file is type "other". Sorry for the screen shots, but I think the print statements are helpful.
This is the file, I am not sure if I can provide an example without using the file because when I set the field in the scenario, it works differently, the value of address is then a string in the match statement. It must have something to do with the data returned from the read row? This is what the data looks like that comes back from the read row:
{
"address": "{"street":"123 Main Street", "city":"Queens", "state":"NY"}"
}
Scenario: test error for stack overflow
* def testAddress = db.readRow("select address from json_issue where person = 'Carole'")
* print testAddress.address
* def jsonAddressMatch =
"""
{
"street":"123 Main Street",
"city": "Queens",
"state": "NY"
}
"""
* print jsonAddressMatch
* match testAddress.address == jsonAddressMatch
This is the first test's results
I tried to see if I could convert it to json thinking it was not being interpreted as json. I added these two lines, but the value is a string so it still is not the correct type.
* json addressObject = testAddress.address
* match addressObject.value == jsonAddressMatch