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

Incorrect strict decoding + transformConstructorNames behaviour #216

Closed
jatcwang opened this issue Mar 21, 2022 · 0 comments · Fixed by #217
Closed

Incorrect strict decoding + transformConstructorNames behaviour #216

jatcwang opened this issue Mar 21, 2022 · 0 comments · Fixed by #217

Comments

@jatcwang
Copy link
Contributor

keyNames.map(memberNameTransformer) ++ config.discriminator.map(constructorNameTransformer)

In the above code the strict decoder is establishing the fields it expects in a JSON object (to check no extra unexpected fields are present).

If a discriminator is specified e.g. "type", then we should be expecting a "type" field in the JSON, there is no need to pass it through the constructorNameTransformer function

jatcwang added a commit to jatcwang/circe-generic-extras that referenced this issue Mar 21, 2022
zarthross added a commit to jatcwang/circe-generic-extras that referenced this issue Oct 21, 2022
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 a pull request may close this issue.

1 participant