Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to deserialize and serialize attributes using serde #804

Open
eirnym opened this issue Sep 23, 2024 · 5 comments
Open

Document how to deserialize and serialize attributes using serde #804

eirnym opened this issue Sep 23, 2024 · 5 comments
Labels
documentation Issues about improvements or bugs in documentation serde Issues related to mapping from Rust types to XML

Comments

@eirnym
Copy link

eirnym commented Sep 23, 2024

There's a few examples here and there, I'd like to gather them to documentation, how idiomatically define an attribute using serde and this library as a parser and serializer.

@Mingun
Copy link
Collaborator

Mingun commented Sep 24, 2024

That documentation already exists. It may be not so visible, I'm open on suggestions how to improve that.

@Mingun Mingun added serde Issues related to mapping from Rust types to XML documentation Issues about improvements or bugs in documentation labels Sep 24, 2024
@eirnym
Copy link
Author

eirnym commented Sep 24, 2024

To be honest this documented for Deserialization, which is also exists in an a quite obscure example. From documentation itself I'm not sure from documentation that this will work for Serialization. One doesn't strictly mean the other.

@Mingun
Copy link
Collaborator

Mingun commented Sep 24, 2024

It is located in de just because serde support is optional and we need to put that documentation somewhere under the feature flag. The main page does not say that it is only for deserialization:

Read more about mapping Rust types to XML in the documentation of de module.

se module does not have link to this documentation, however, this can be improved. PR is welcome. Some mention on attributes page also could be useful, because this page is what will be found by "attribute" query in rustdoc.

@eirnym
Copy link
Author

eirnym commented Sep 24, 2024

When I open documentation, I see a quite small example for Serde and no other links whatsoever. I'd prefer to have documentation separation into specific documents, like for plain reader/writer you have and integration with Serde. Inside Serde probably there would be good to have separate documentation for (de)serialization if there's some specific details worth a separate page. Similar structure you can find in clap documentation.

@Mingun
Copy link
Collaborator

Mingun commented Sep 24, 2024

When I open documentation, I see a quite small example for Serde and no other links whatsoever.

This is readme file, the documentation starts here. Usually readme is not overloaded with links, but as I already said: I'm open for suggestions and PRs for improving documentation and making quick-xml better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues about improvements or bugs in documentation serde Issues related to mapping from Rust types to XML
Projects
None yet
Development

No branches or pull requests

2 participants