Skip to main content
Share Your Experience: Take the 2024 Developer Survey
2 votes
Accepted

Variables in jsonpath expression

It's possible to use JMeter Variables (or functions) in JSON Extractor JsonPath expressions, your syntax is simply incorrect (you can check it yourself using Debug Sampler) My expectation is that you ...
Dmitri T's user avatar
  • 13.5k
1 vote
Accepted

Avoiding a NPE when checking JSON response using JsonPath and Rest Assured

String response =RestAssured.get("https://praveendvd.free.beeceptor.com/test"). then().extract().response().asString(); JSONObject jsonObj = new JSONObject(...
PDHide's user avatar
  • 11.1k
1 vote

Getting an error while trying to run a script using Rest-Assured library

Looking at that stracktrace, the regular expression used for the matching is recursing infinitely causing a stackoverflow exception. Your search criteria is likely being translated into a regex ...
anichols's user avatar
1 vote
Accepted

Extract multiple JsonPath values from returned Response using Rest Assured

JsonPath that is used in RestAssured uses the different syntax. Your path would look like cust.findAll{i -> i.name == 'STATUS_ID' || i.name == 'RENEWAL_ID'}.id. Here is the example code: package ...
Alexey R.'s user avatar
  • 11.6k
1 vote

How to extract a value from a JSON response with Java and Rest-Assured

What you are showing is called a JSON object. Unless you're in JavaScript (that can natively parse JSON data) you can use a jsonpath language that is very similar to xpath (serves for similar purpose)....
Alexey R.'s user avatar
  • 11.6k
1 vote

Rest-assured. Is it possible to extract JSONObject/JSONArray from response json?

Why is this not an option? JsonPath resJson= new JsonPath(response); JsonPath referrenceJson= new JsonPath(jsonTOCompare); Assert.assertEquals(resJson.get("fields"), referrenceJson.get("fields"));
PDHide's user avatar
  • 11.1k

Only top scored, non community-wiki answers of a minimum length are eligible