@@ -239,7 +239,7 @@ impl SchemaSerializer {
239
239
240
240
#[ allow( clippy:: too_many_arguments) ]
241
241
#[ pyfunction]
242
- #[ pyo3( signature = ( value, * , indent = None , include = None , exclude = None , by_alias = None ,
242
+ #[ pyo3( signature = ( value, * , indent = None , include = None , exclude = None , by_alias = true ,
243
243
exclude_none = false , round_trip = false , timedelta_mode = "iso8601" , bytes_mode = "utf8" ,
244
244
inf_nan_mode = "constants" , serialize_unknown = false , fallback = None , serialize_as_any = false ,
245
245
context = None ) ) ]
@@ -249,7 +249,7 @@ pub fn to_json(
249
249
indent : Option < usize > ,
250
250
include : Option < & Bound < ' _ , PyAny > > ,
251
251
exclude : Option < & Bound < ' _ , PyAny > > ,
252
- by_alias : Option < bool > ,
252
+ by_alias : bool ,
253
253
exclude_none : bool ,
254
254
round_trip : bool ,
255
255
timedelta_mode : & str ,
@@ -265,7 +265,7 @@ pub fn to_json(
265
265
let extra = state. extra (
266
266
py,
267
267
& SerMode :: Json ,
268
- by_alias,
268
+ Some ( by_alias) ,
269
269
exclude_none,
270
270
round_trip,
271
271
serialize_unknown,
@@ -282,15 +282,15 @@ pub fn to_json(
282
282
283
283
#[ allow( clippy:: too_many_arguments) ]
284
284
#[ pyfunction]
285
- #[ pyo3( signature = ( value, * , include = None , exclude = None , by_alias = None , exclude_none = false , round_trip = false ,
285
+ #[ pyo3( signature = ( value, * , include = None , exclude = None , by_alias = true , exclude_none = false , round_trip = false ,
286
286
timedelta_mode = "iso8601" , bytes_mode = "utf8" , inf_nan_mode = "constants" , serialize_unknown = false , fallback = None ,
287
287
serialize_as_any = false , context = None ) ) ]
288
288
pub fn to_jsonable_python (
289
289
py : Python ,
290
290
value : & Bound < ' _ , PyAny > ,
291
291
include : Option < & Bound < ' _ , PyAny > > ,
292
292
exclude : Option < & Bound < ' _ , PyAny > > ,
293
- by_alias : Option < bool > ,
293
+ by_alias : bool ,
294
294
exclude_none : bool ,
295
295
round_trip : bool ,
296
296
timedelta_mode : & str ,
@@ -306,7 +306,7 @@ pub fn to_jsonable_python(
306
306
let extra = state. extra (
307
307
py,
308
308
& SerMode :: Json ,
309
- by_alias,
309
+ Some ( by_alias) ,
310
310
exclude_none,
311
311
round_trip,
312
312
serialize_unknown,
0 commit comments