Members
(inner) config :Object
Plugin configuration object.
Properties:
Name | Type | Default | Description |
---|---|---|---|
scope |
String
|
Array
|
'json-loader' | The scope(s) for which this plugin will return data. |
path |
String
|
Object
|
The path(s) of JSON files to load. |
Type:
-
Object
Methods
(inner) data(pluginContext) → {Object}
Load a JSON file either from the file system or via an HTTP(S) request and return its contents as an object.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
pluginContext |
Object
|
|
Returns:
- Type:
-
Object
Data retrieved from the JSON file.