@@ -357,7 +357,7 @@ def to_json(
357357 by_alias : bool = True ,
358358 exclude_none : bool = False ,
359359 round_trip : bool = False ,
360- timedelta_mode : Literal ['iso8601' , 'float ' ] = 'iso8601' ,
360+ timedelta_mode : Literal ['iso8601' , 'seconds_float' , 'milliseconds_float ' ] = 'iso8601' ,
361361 bytes_mode : Literal ['utf8' , 'base64' , 'hex' ] = 'utf8' ,
362362 inf_nan_mode : Literal ['null' , 'constants' , 'strings' ] = 'constants' ,
363363 serialize_unknown : bool = False ,
@@ -378,7 +378,7 @@ def to_json(
378378 by_alias: Whether to use the alias names of fields.
379379 exclude_none: Whether to exclude fields that have a value of `None`.
380380 round_trip: Whether to enable serialization and validation round-trip support.
381- timedelta_mode: How to serialize `timedelta` objects, either `'iso8601'` or `'float '`.
381+ timedelta_mode: How to serialize `timedelta` objects, either `'iso8601'`, `'seconds_float'` or `'milliseconds_float '`.
382382 bytes_mode: How to serialize `bytes` objects, either `'utf8'`, `'base64'`, or `'hex'`.
383383 inf_nan_mode: How to serialize `Infinity`, `-Infinity` and `NaN` values, either `'null'`, `'constants'`, or `'strings'`.
384384 serialize_unknown: Attempt to serialize unknown types, `str(value)` will be used, if that fails
@@ -432,7 +432,7 @@ def to_jsonable_python(
432432 by_alias : bool = True ,
433433 exclude_none : bool = False ,
434434 round_trip : bool = False ,
435- timedelta_mode : Literal ['iso8601' , 'float ' ] = 'iso8601' ,
435+ timedelta_mode : Literal ['iso8601' , 'seconds_float' , 'milliseconds_float ' ] = 'iso8601' ,
436436 bytes_mode : Literal ['utf8' , 'base64' , 'hex' ] = 'utf8' ,
437437 inf_nan_mode : Literal ['null' , 'constants' , 'strings' ] = 'constants' ,
438438 serialize_unknown : bool = False ,
@@ -453,7 +453,7 @@ def to_jsonable_python(
453453 by_alias: Whether to use the alias names of fields.
454454 exclude_none: Whether to exclude fields that have a value of `None`.
455455 round_trip: Whether to enable serialization and validation round-trip support.
456- timedelta_mode: How to serialize `timedelta` objects, either `'iso8601'` or `'float '`.
456+ timedelta_mode: How to serialize `timedelta` objects, either `'iso8601'`, `'seconds_float'`, or`'milliseconds_float '`.
457457 bytes_mode: How to serialize `bytes` objects, either `'utf8'`, `'base64'`, or `'hex'`.
458458 inf_nan_mode: How to serialize `Infinity`, `-Infinity` and `NaN` values, either `'null'`, `'constants'`, or `'strings'`.
459459 serialize_unknown: Attempt to serialize unknown types, `str(value)` will be used, if that fails
0 commit comments