Skip to content

Respect use defaults#424

Open
s-nel wants to merge 2 commits intocirce:masterfrom
s-nel:respect-use-defaults
Open

Respect use defaults#424
s-nel wants to merge 2 commits intocirce:masterfrom
s-nel:respect-use-defaults

Conversation

@s-nel
Copy link
Copy Markdown

@s-nel s-nel commented Oct 3, 2022

Currently the useDefaults parameter does nothing and defaults are always taken when the key is not present or is null in the Json. This PR changes the behavior so that when useDefaults is false, defaults are ignored, and an error will be raised for non-optional fields, or None will be used for optional fields.

Fixes: #297

@s-nel
Copy link
Copy Markdown
Author

s-nel commented Dec 18, 2024

@scala-steward @travisbrown sorry to ping you on this old PR, and I understand this project is pretty inactive, but any chance we could get this reviewed? We've been using my fork of circe-derivation in prod for a couple years and would love to switch to depending on an official release 😁

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.

useDefaults parameter is ignored in deriveDecoder

1 participant