A loadable json asset. This asset type loads JSON from a remote file.
Kind: global class
- JsonAsset
- .data ⇒
*
- .valid
- .load() ⇒
Promise
- .create(source) ⇒
Promise
- .destroy()
- .data ⇒
Get json data.
Kind: instance property of JsonAsset
Returns: *
- Data as dictionary.
Kind: instance property of JsonAsset
Load the JSON data from the asset URL.
Kind: instance method of JsonAsset
Returns: Promise
- Promise to resolve when fully loaded.
Create the JSON data asset from object or string.
Kind: instance method of JsonAsset
Returns: Promise
- Promise to resolve when asset is ready.
Param | Type | Description |
---|---|---|
source | Object | String |
Data to create asset from. |
Kind: instance method of JsonAsset