GeneratorOptions.fromJson constructor
GeneratorOptions.fromJson(
- Map json
Implementation
factory GeneratorOptions.fromJson(Map json) {
return GeneratorOptions(
generator: GeneratorConfig.fromJson(json['generator']),
otherGenerators: (json['otherGenerators'] as Iterable)
.map((e) => GeneratorConfig.fromJson(e)),
schemaPath: json['schemaPath'],
schema: json['schema'] ?? json['datamodel'],
dmmf: DMMF.fromJson(json['dmmf']),
datasources:
(json['datasources'] as Iterable).map((e) => Datasource.fromJson(e)),
version: json['version'],
binaryPaths: BinaryPaths.fromJson(json['binaryPaths'] ?? const {}),
postinstall: json['postinstall'] ?? false,
noEngine: json['noEngine'] ?? false,
);
}