Azure / Azure/azure-sdk-for-python

[core] change serialization for hybrid models to `model_dump` in `azure.core.serialization`

Aperta
#41,437 1 commento 0 reazioni 1 assegnatario Assegnata a @pvaneck Vedi su GitHub
Azure.Core
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.