ImJeremyHe / xmlserde

A user-friendly Rust library for serializing or deserializing the XML files
22 stars 2 forks source link

Support deny_unknown_fields like serde? #45

Closed bilelmoussaoui closed 5 months ago

bilelmoussaoui commented 5 months ago

Currently, serde, provides a neat #[serde(deny_unknown_fields)] attribute that makes the parser fail if it encounters any field that is not properly handled in the defined struct/enum or so.

This allows to easily add conforms tests that all the possible tags are supported. This is very useful when writing a library to parse a specific xml format.

ImJeremyHe commented 5 months ago

Cool. I would love to work on this feature when I am available.