Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.6 KB

assets_json_asset.md

File metadata and controls

55 lines (38 loc) · 1.6 KB

Shaku JS

Back To Table of Content

Json Asset

JsonAsset

A loadable json asset. This asset type loads JSON from a remote file.

Kind: global class

jsonAsset.data ⇒ *

Get json data.

Kind: instance property of JsonAsset
Returns: * - Data as dictionary.

jsonAsset.valid

Kind: instance property of JsonAsset

jsonAsset.load() ⇒ Promise

Load the JSON data from the asset URL.

Kind: instance method of JsonAsset
Returns: Promise - Promise to resolve when fully loaded.

jsonAsset.create(source) ⇒ Promise

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.

jsonAsset.destroy()

Kind: instance method of JsonAsset