@@ -239,7 +239,7 @@ impl SchemaSerializer {
239239
240240#[ allow( clippy:: too_many_arguments) ]
241241#[ 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 ,
243243 exclude_none = false , round_trip = false , timedelta_mode = "iso8601" , bytes_mode = "utf8" ,
244244 inf_nan_mode = "constants" , serialize_unknown = false , fallback = None , serialize_as_any = false ,
245245 context = None ) ) ]
@@ -249,7 +249,7 @@ pub fn to_json(
249249 indent : Option < usize > ,
250250 include : Option < & Bound < ' _ , PyAny > > ,
251251 exclude : Option < & Bound < ' _ , PyAny > > ,
252- by_alias : Option < bool > ,
252+ by_alias : bool ,
253253 exclude_none : bool ,
254254 round_trip : bool ,
255255 timedelta_mode : & str ,
@@ -265,7 +265,7 @@ pub fn to_json(
265265 let extra = state. extra (
266266 py,
267267 & SerMode :: Json ,
268- by_alias,
268+ Some ( by_alias) ,
269269 exclude_none,
270270 round_trip,
271271 serialize_unknown,
@@ -282,15 +282,15 @@ pub fn to_json(
282282
283283#[ allow( clippy:: too_many_arguments) ]
284284#[ 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 ,
286286 timedelta_mode = "iso8601" , bytes_mode = "utf8" , inf_nan_mode = "constants" , serialize_unknown = false , fallback = None ,
287287 serialize_as_any = false , context = None ) ) ]
288288pub fn to_jsonable_python (
289289 py : Python ,
290290 value : & Bound < ' _ , PyAny > ,
291291 include : Option < & Bound < ' _ , PyAny > > ,
292292 exclude : Option < & Bound < ' _ , PyAny > > ,
293- by_alias : Option < bool > ,
293+ by_alias : bool ,
294294 exclude_none : bool ,
295295 round_trip : bool ,
296296 timedelta_mode : & str ,
@@ -306,7 +306,7 @@ pub fn to_jsonable_python(
306306 let extra = state. extra (
307307 py,
308308 & SerMode :: Json ,
309- by_alias,
309+ Some ( by_alias) ,
310310 exclude_none,
311311 round_trip,
312312 serialize_unknown,
0 commit comments