Documentation Language: Swift

Method

loadJSONResource(uri:)

Load a JSON resource from a file URL

func loadJSONResource(uri: String) async throws -> Resource

Parameters

uri

The URI of the JSON file to load

Return Value

The loaded Resource, either newly loaded or cached from previous load

Discussion

This method is a convenience for loading JSON files without requiring resource factories to be set up. It creates a JSONParser and loads the resource directly.

This method is automatically called when resolving cross-resource references to JSON files.