executeFromJsonFile method
Execute from a JSON file.
Convenience method that loads and parses a JSON file and executes. Supports both plain .json and gzipped .json.gz files.
Implementation
Future<dynamic> executeFromJsonFile({
required String path,
String name = 'main',
List<Object?>? positionalArgs,
Map<String, Object?>? namedArgs,
}) async {
final ast = await parseJsonFile(path);
return execute(
ast: ast,
name: name,
positionalArgs: positionalArgs,
namedArgs: namedArgs,
);
}