JSON¶
Connect to a JSON document so you can choose a record collection, build a query, and fill the report from those records.
Goal¶
Create a working JSON connection in Connection Manager and use it as a report Data Source.
Prerequisites¶
- A
.jsonfile, or an HTTP or HTTPS URL that returns one JSON document - Records grouped in an array the connection can discover, such as the document root or a property named
customers,data, orresults
Steps¶
- Open Data → Connection Manager….
- Add a connection and choose JSON.
- Choose a Source:
- File — browse to the
.jsonfile, or enter its path. - URL — enter the document URL, for example
https://example.com/data/customers.json. - Click Test. Test lists the record collections it finds.
- Choose the Record collection.
- Save the connection.
- On the Data tab, select the connection. Browse data and the collection, then open its columns.
- Open Query Builder, choose columns and filters, then Apply.
- Preview the rows, place fields on the report, then Preview.
[ Screenshot: JSON connection settings ]
Notes¶
Note
File mode keeps the selected path on the desktop. In the Web Designer, the uploaded file is stored with the data source.
Note
URL mode requests the document with GET when the report runs. The URL stays on the data source and is not copied into the report. This is not a REST API connection: there is no authentication, custom headers, request body, or pagination.
Note
Nested objects become dotted column names, such as address.city.
Tip
Report parameters ($P{name}) can filter the query.
Result¶
The connection appears in Connection Manager. Query results become report fields.