JSON data
How DocStudio reads your JSON data: arbitrary shapes, paths, special names like $index and $rows, scopes inside repeaters and tables, and limits.
DocStudio merges arbitrary JSON into a template. No schema is required. The data only has to be plain JSON: objects, arrays, strings, numbers, booleans and null.
Paths
A path is a dotted name into the data: customer.name, invoice.number. A path that starts inside a repeater or table row reads the current item.
| Name | Meaning |
|---|---|
$root |
The whole data object |
$parent |
The data outside the current repeater, repeatable to climb levels |
$index |
The position of the current item, from 0 |
$count |
The number of items |
$rows |
The data rows of the table, inside a table footer |
$props |
The props passed to a reusable component |
Paths reject the segments __proto__, constructor and prototype, and data is only read with own-property lookups.
Limits
Data is bounded before use: depth, number of values, string length, array length and keys per object. Over-limit data returns a LIMIT_EXCEEDED diagnostic rather than throwing. A repeater has a maximum row count, also reported as a diagnostic.
Sample data in the designer
The designer's Data tab holds sample data. It drives the canvas, the expression previews and the View action. The preview shows the first 50 rows of a list, while real output includes every row.