@@ -66,25 +66,25 @@ class JsonSerializableGenerator
66
66
/// [CheckedFromJsonException] is thrown.
67
67
final bool checked;
68
68
69
- /// If `true ` , generated `toJson` methods will explicitly call `toJson` on
69
+ /// If `false ` , generated `toJson` methods will explicitly call `toJson` on
70
70
/// nested objects.
71
71
///
72
72
/// When using JSON encoding support in `dart:convert` , `toJson` is
73
73
/// automatically called on objects, so the default behavior
74
- /// (`explicitToJson: false ` ) is to omit the `toJson` call.
74
+ /// (`implicitToJson: true ` ) is to omit the `toJson` call.
75
75
///
76
- /// Example of `explicitToJson: false ` (default)
76
+ /// Example of `implicitToJson: true ` (default)
77
77
///
78
78
/// ```dart
79
79
/// Map<String, dynamic> toJson() => {'child': child};
80
80
/// ```
81
81
///
82
- /// Example of `explicitToJson: true `
82
+ /// Example of `implicitToJson: false `
83
83
///
84
84
/// ```dart
85
85
/// Map<String, dynamic> toJson() => {'child': child?.toJson()};
86
86
/// ```
87
- final bool explicitToJson ;
87
+ final bool implicitToJson ;
88
88
89
89
/// Creates an instance of [JsonSerializableGenerator] .
90
90
///
@@ -95,11 +95,11 @@ class JsonSerializableGenerator
95
95
bool useWrappers: false ,
96
96
bool anyMap: false ,
97
97
bool checked: false ,
98
- bool explicitToJson : false ,
98
+ bool implicitToJson : true ,
99
99
}) : this .useWrappers = useWrappers ?? false ,
100
100
this .anyMap = anyMap ?? false ,
101
101
this .checked = checked ?? false ,
102
- this .explicitToJson = explicitToJson ?? false ,
102
+ this .implicitToJson = implicitToJson ?? true ,
103
103
this ._typeHelpers = typeHelpers ?? _defaultHelpers;
104
104
105
105
/// Creates an instance of [JsonSerializableGenerator] .
0 commit comments