json
This set of commands is designed to support
JSON validation and manipulation
as part of a test automation. For basic validation, assertWellformed(json)
and assertCorrectness(json,schema) might suffice. These two commands provide
validation at the document level. For more fine-grained assertion and manipulation, we need a descriptive and
structure-aware specification to communicate the intent - something akins to XPath for XML. Please read
Nexial jsonpath for more details on how to accomplish this.
Available Commands
addOrReplace(json,jsonpath,input,var)assertCorrectness(json,schema)assertElementCount(json,jsonpath,count)assertElementNotPresent(json,jsonpath)assertElementPresent(json,jsonpath)assertEqual(expected,actual)assertValue(json,jsonpath,expected)assertValues(json,jsonpath,array,exactOrder)assertWellformed(json)beautify(json,var)compact(var,json,removeEmpty)minify(json,var)storeCount(json,jsonpath,var)storeKeys(json,jsonpath,var)storeValue(json,jsonpath,var)storeValues(json,jsonpath,var)