deserialize_struct loses the main element

Aperta
#448 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start in src/de/mod.rs around the deserialize_struct implementation linked in the issue, then trace how its internal map is passed to the visitor. Reproduce the reported round trip with <a><b>1</b></a> and check whether the outer element is preserved in the serialized result. Done means the visitor receives enough information to retain the main element; the issue names no test file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

serde

I'm using quick-xml to deserialize to another generic structure, but it seems like the main element is not passed to the visitor.
e.g.

<a><b>1</b></a>

when deserialize and serialized returned as:

"<b>1</b>"

Looking at the code it seems like the issues is since in https://github.com/tafia/quick-xml/blob/ad57bc29e8d9b10309748ce362fffc3580322cf5/src/de/mod.rs#L727
name is never passed to the visitor and only the internal map is.

Lingua principale
Rust
Stelle
1.6k
Fork
299
Merge medio
2g 4h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tafia/quick-xml

Tutte le issue di tafia/quick-xml

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.