GET http://localhost:8000/assert-json
HTTP/1.0 200jsonpath "$.count" equals 5jsonpath "$.count" equals 5.0jsonpath "$.count" greaterThan 1jsonpath "$.count" greaterThan 1.0jsonpath "$.success" equals falsejsonpath "$.success" not equals nulljsonpath "$.success" existsjsonpath "$.success" isBooleanjsonpath "$.errors" equals 2jsonpath "$.errors" isCollectionjsonpath "$.warnings" equals 0jsonpath "$.toto" not existsjsonpath "$.warnings" existsjsonpath "$.warnings" existsjsonpath "$.errors[0]" existsjsonpath "$.errors[0]" isCollectionjsonpath "$.errors[0].id" equals "error1"jsonpath "$.errors[0]['id']" equals "error1"jsonpath "$.duration" equals 1.5jsonpath "$.duration" lessThanOrEquals 2.0jsonpath "$.duration" lessThan 2jsonpath "$.duration" isFloatjsonpath "$.duration" not isIntegerjsonpath "$.nullable" equals null{ "count": 5, "success": false, "errors": [{"id":"error1"},{"id":"error2"}], "warnings": [], "duration": 1.5, "tags": ["test"], "nullable": null}
GET http://localhost:8000/assert-json/index
HTTP/1.0 200index: status
GET http://localhost:8000/assert-json
HTTP/1.0 200jsonpath "$.errors[{{index}}].id" equals "error2"jsonpath "$.tags" includes "test"jsonpath "$.tags" not includes "prod"jsonpath "$.tags" not includes null
GET http://localhost:8000/assert-json/list
HTTP/1.0 200jsonpath "$" equals 2jsonpath "$.[0].name" equals "Bob"jsonpath "$[0].name" equals "Bob"