Azure / Azure/azure-sdk-for-python
[core] change serialization for hybrid models to `model_dump` in `azure.core.serialization`
Open
Azure.Core
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
We want to follow what dataclass does and do model -> json serialization as a module-level method in `azure.core.serialization`. The thought here is to add something like `model_dump` in `azure.core.serialization`, which will take in a hybrid model and output it in a dumped model format. This way, people can save it to file / pass to `json.dumps`.
As part of this, we will deprecate `.as_dict()` on our new hybrid models
Contributor guide
Assessment
This issue has not been assessed yet.