@@ -49,6 +49,7 @@ class ClassConfig {
4949 final bool createFactory;
5050 final bool createToJson;
5151 final bool createFieldMap;
52+ final bool createJsonKeys;
5253 final bool createPerFieldToJson;
5354 final bool disallowUnrecognizedKeys;
5455 final bool explicitToJson;
@@ -66,6 +67,7 @@ class ClassConfig {
6667 required this .createFactory,
6768 required this .createToJson,
6869 required this .createFieldMap,
70+ required this .createJsonKeys,
6971 required this .createPerFieldToJson,
7072 required this .disallowUnrecognizedKeys,
7173 required this .explicitToJson,
@@ -85,6 +87,8 @@ class ClassConfig {
8587 constructor: config.constructor ?? ClassConfig .defaults.constructor,
8688 createFieldMap:
8789 config.createFieldMap ?? ClassConfig .defaults.createFieldMap,
90+ createJsonKeys:
91+ config.createJsonKeys ?? ClassConfig .defaults.createJsonKeys,
8892 createPerFieldToJson: config.createPerFieldToJson ??
8993 ClassConfig .defaults.createPerFieldToJson,
9094 createFactory:
@@ -113,6 +117,7 @@ class ClassConfig {
113117 createFactory: true ,
114118 createToJson: true ,
115119 createFieldMap: false ,
120+ createJsonKeys: false ,
116121 createPerFieldToJson: false ,
117122 disallowUnrecognizedKeys: false ,
118123 explicitToJson: false ,
@@ -129,6 +134,7 @@ class ClassConfig {
129134 createFactory: createFactory,
130135 createToJson: createToJson,
131136 createFieldMap: createFieldMap,
137+ createJsonKeys: createJsonKeys,
132138 createPerFieldToJson: createPerFieldToJson,
133139 ignoreUnannotated: ignoreUnannotated,
134140 explicitToJson: explicitToJson,
0 commit comments