We will be adding code snippets in other languages.
In Getting Started: Understanding the Response, we reviewed the basic structure of a JSON output and hypermedia link. In this article, we will share a few options to programmatically consume the JSON response from
JSON is native to Python. Working with CDISC Library's JSON outputs is fairly straighforward. This code show how to iterate through all the hypermedia links and simply dumping out the content:A sample output:
Another way is to use JSONPath. JSONPath is very similar to XPath (for XML) in many ways that allow you to query a JSON structure. The expression to obtain all the hrefs from the output:
This is an excerpt of the JSONPath result:
JSONPath Reference. Smartbear. https://support.smartbear.com/readyapi/docs/testing/jsonpath-reference.html