How to Parse JSON Responses in Katalon Studio

A JSON Response Example

Suppose we have the following JSON response, and we want to parse and retrieve its data: { “menu”: { “id”: “file”, “tools”: { “actions”: [ { “id”: “new”, “title”: “New file” }, { “id”: “open”, “title”: “Open File” }, { “id”: “close”, “title”: “Close File” } ], “errors”: [] } } }

JsonSlurper

We use this Groovy helper class to parse JSON strings. We need to create a new instance of JsonSlurper and call the JsonSlurper.parseText method. Sample code: https://goo.gl/iVxBH7

Subscribe To Newsletter

Sign up for my newsletter and get the latest technology news

2019 © Craig Brown PhD. All rights reserved.