You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to_jsonable_python only seems to apply exclude_none for pydantic models, presumbly for dataclass.dataclass or dict types it is just returning asdict or the supplied value for the top level
Expected
exclude_none=True should be honoured for all dict members in result of to_jsonable_python ..
.... I feel that the behaviour should be homogeneous here, since to_jsonable_python is accepting ( and serialising ) none pydantic types, the fact that this top level instruction is ignored, while others are honoured, seems inconsistent.
to_jsonable_python
only seems to applyexclude_none
for pydantic models, presumbly fordataclass.dataclass
ordict
types it is just returningasdict
or the supplied value for the top levelExpected
exclude_none=True
should be honoured for all dict members in result ofto_jsonable_python
...... I feel that the behaviour should be homogeneous here, since
to_jsonable_python
is accepting ( and serialising ) none pydantic types, the fact that this top level instruction is ignored, while others are honoured, seems inconsistent.Test Case
The text was updated successfully, but these errors were encountered: