Z.getJSON(...)
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
Z.getJSON(url: string, success: (data?: any) => void, error?: (xhr?: any) => void);
Retrieves a JSON document from a URL.
For more information please see our Fetching JSON page.
We highly recommend using HTTPS for all calls using this function. In addition to the security benefits for your users, Apple are deprecating HTTP-only network connections from apps.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
url | string | The address of the JSON to get. |
success | function | A function that will be called if the JSON is successfully retrieved. The function can be passed the JavaScript object that results from parsing the response. |
error | function | A function that will be called if an error occurred in retrieving the document, or in parsing it. |
Returns
Section titled “Returns”XMLHttpRequest
object.