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

JsonDecoder should take into account all annotations on EnumN and GenericRecord #700

Closed
987Nabil opened this issue Jun 28, 2024 · 5 comments · Fixed by #704
Closed

JsonDecoder should take into account all annotations on EnumN and GenericRecord #700

987Nabil opened this issue Jun 28, 2024 · 5 comments · Fixed by #704

Comments

@987Nabil
Copy link
Contributor

The enumEncoder/Decoder and the recordEncoder/Decoder almost ignore all annotations on fields. Something like mapped names with the @fieldName annotation are working, because they are picked up by the macro and set as name of the fields. But we should not rely on it. If I create a Schema by hand and add the annotation or add the annotation after the macro, it should still work.

@jdegoes
Copy link
Member

jdegoes commented Jun 28, 2024

/bounty $250

Copy link

algora-pbc bot commented Jun 28, 2024

💎 $250 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #700 with your implementation plan
  2. Submit work: Create a pull request including /claim #700 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-schema!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @987Nabil Jun 29, 2024, 5:51:26 PM #704

@987Nabil
Copy link
Contributor Author

987Nabil commented Jun 29, 2024

/attempt #700

Algora profile Completed bounties Tech Active attempts Options
@987Nabil    50 ZIO bounties
+ 1 bounty from 1 project
Scala
Cancel attempt

Copy link

algora-pbc bot commented Jun 29, 2024

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Jun 30, 2024
987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Jun 30, 2024
jdegoes pushed a commit that referenced this issue Jul 9, 2024
* JsonCodec respects annotations for GenericRecord (#700)

* Tests for JsonCodec for Schema.EnumN (#700)
Copy link

algora-pbc bot commented Jul 9, 2024

🎉🎈 @987Nabil has been awarded $250! 🎈🎊

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

Successfully merging a pull request may close this issue.

2 participants