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

Fields mandatory unless specified otherwise #145

Closed
wants to merge 5 commits into from

Conversation

Wassasin
Copy link

Implements #144.

Not happy yet with how some of the error handling is taking place. Most notably optional structs are set to None if they do not parse successfully.

Secondly this change is a major move from the current semantics of the crate. There should be a discussion on whether this is acceptable at all, and how to communicate clearly to users that whilst their code may still compile, input data will be rejected unless #[yaserde(default)] is added here and there.

@MarcAntoine-Arnaud MarcAntoine-Arnaud changed the title WIP: Fields mandatory unless specified otherwise Fields mandatory unless specified otherwise Mar 3, 2023
@reknih
Copy link

reknih commented Jun 2, 2023

I like this PR. We would like to use yaserde to deserialize CSL files with citationberg. Many CSL fields are mandatory and have no sane default so the parsing should fail for them.

@MarcAntoine-Arnaud MarcAntoine-Arnaud changed the base branch from master to main January 3, 2024 16:49
@MarcAntoine-Arnaud
Copy link
Contributor

@Wassasin I have updated the project, and now this feature is supported.
Fell free to comment, test the version 0.10.

@lfpraca
Copy link

lfpraca commented Mar 27, 2024

Feature seems to be working OK, returns err on missing fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants