Skip to content

Commit

Permalink
Add note on DSS Json template guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Vathsan committed Jan 20, 2022
1 parent d93f3e4 commit 95079a4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,18 @@ Alternatively, you can use one of the following JSON templates for the response
}
</result>
```

!!! Info
As shown in the sample given above, the column name values that are expected in the query result should be referred to by the column name with the `$` prefix. E.g. `$EmployeeNumber`.

Also, the structure of the JSON template should follow some guidelines in order to be compatible with the result. These guidelines are:

- The top most item should be a JSON object. It cannot be a JSON array.
- For handling multiple records from the result set, the immediate child of the top most object can be a JSON array, and the array should contain only a single object.
- If only a single result is returned, the immediate child of the top most object can be a single JSON object.
- After the immediate child of the top most object, there cannot be other JSON arrays in the mapping.

All JSON responses are returned as an array.

- If you want to write a nested query using JSON, see the example on [nested queries](../../../../use-cases/examples/data_integration/nested-queries-in-data-service).

Expand Down

0 comments on commit 95079a4

Please sign in to comment.