Skip to main content

JsonAsset

APJS Script API reference for the JsonAsset class.

TypeNameInterface Description
Variablesjson: any

Function: Gets the parsed JSON object or array represented by this asset. Each access parses the current raw text and returns a new JS value; modifying the returned object does not write back to the asset. Returns undefined when the file cannot be loaded, the JSON is invalid, or the top-level value is not an object/array.

Functionsconstructor()

Examples

constructor()

let obj = new APJS.JsonAsset();

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use JsonAsset here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies