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

Add workaround to fix decoding of nested structs #14

Merged
merged 1 commit into from
Sep 18, 2019
Merged

Add workaround to fix decoding of nested structs #14

merged 1 commit into from
Sep 18, 2019

Conversation

jcomellas
Copy link
Contributor

Poison has a bug when using Poison.decode!/2 with automatic conversion to structs that causes the Poison.Decoder protocol for the corresponding struct to be called twice. What ends up happening with the DocuSign models is that the second decode (using default values for the struct) overwrites the ones coming for the response.

This workaround avoids calling the Poison.Decoder protocol a second time.

For more information see: devinus/poison#191

Poison has a bug when using Poison.decode!/2 with automatic conversion
to structs that causes the Poison.Decoder protocol for the corresponding
struct to be called twice. What ends up happening with the DocuSign
models is that the second decode (using default values for the struct)
overwrites the ones coming for the response.

This workaround avoids calling the Poison.Decoder protocol a second
time.

For more information see: devinus/poison#191
@neilberkman neilberkman merged commit cc3e605 into neilberkman:master Sep 18, 2019
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.

2 participants