add shorthand functions for serialization
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Inizia leggendo i requisiti in microsoft/kiota#3406 e ispeziona le astrazioni esistenti per la serializzazione/deserializzazione di modelli e collezioni. Definisci gli helper supportati per stringhe e stream, le varianti di content-type e JSON, i percorsi di reflection o callback, e conferma che l’intera API sia coperta senza conflitti di nomi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
to facilitate serialization and deserialization of models and collections of models, we're adding static helper functions.
More details to be found at https://github.com/microsoft/kiota/issues/3406
For serialization we need:
- Serialize(contentType, model): string
- Serialize(contentType, model): stream
- SerializeCollection(contentType, models): string
- SerializeCollection(contentType, models): stream
- Serialize(model): stream (maps to same one passing the json content type as a constant)
- Serialize(model): string (same)
- Serialize(models): stream (same)
- Serialize(models): string (same)
Note: if converting from stream to string is trivial we can ommit the string overloads
Note: if another parameter for the serialization method needs to be added, feel free to do so
Note: if both a string and and stream method need to be added, but can't have the same name, name the string methods with AsString suffix
Note: if the Json methods and the ones accepting the same content type can't have the same namde/would need to be aliased in the consuming code to avoid conflicts, as a ToJsonSuffix (full convention with string SerializeCollectionToJsonAsString)
For deserialization we need:
- Deserialize(contentType, stream, createTFromDiscriminatorMethod): T
- Deserialize(contentType, string, createTFromDiscriminatorMethod): T
- Deserialize(contentType, stream): T (uses reflection, only if possible, calls into the previous one)
- Deserialize(contentType, string): T (same)
- DeserializeCollection(contentType, stream, createCallback): T[]
- DeserializeCollection(contentType, string, createCallback): T[]
- reflection version x2
- Json equivalent with constant for all the previous
Note: the same notes as serialization apply
Note: if the collection and single methods can have the same name, make them same
- Lingua principale
- Python
- Stelle
- 31
- Fork
- 39
- Merge medio
- 11h 45m
- PR unite (30g)
- 42
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/kiota-python
-
help wanted type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/kiota-python#477 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
microsoft/kiota-python#737 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
microsoft/kiota-python#722 · 1 commento ·
-
httpx python library issues Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
microsoft/kiota-python#533 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
microsoft/kiota-python#501 · 1 reazione ·
Tutte le issue di microsoft/kiota-python
Issue simili
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
simonw/sqlite-utils#872 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100