Page History
...
- SetSourceString (read from a string)
- SetSourceHttpResponse (read the body of the response from an HTTP request)
- SetSourceFile (read from a file)
| Wiki Markup |
|---|
We'll use the same JSON string that we used in the previous section as an example.
\{
"name": \{
"given": "John",
"surname": "Smith"
\},
"age": 45,
"contactNo":
\[
\{ area: "02", no: "9378 2867", type: "landline" \},
\{ no: "0468 732 371", type: "mobile" \}
\]
\}
Let's assume that this is a response from a HTTP request called #Request, use the SetSourceHttpResponse to read from the response body.
#Reader.SetSourceHttpResponse HttpResponse(#Request.Response)
There are three sets of Read… methods you can use to extract the values from your JSON: |
- Read…WithPath
- Read…WithName
- Read…AtIndex
...