You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way I can choose which case class fields I want to appear in the resulting JSON as empty containers and which ones I don't want to appear at all, preferably without changing my case class field definitions? Much of this library is still pretty magical to me, so I don't know if I'm missing something obvious 😅
Thank you for your time and for the amazing library!
The text was updated successfully, but these errors were encountered:
Unfortunately, it is not possible to do on the field level. It would be a good feature to add corresponding compile-time annotations for remaining derivation configuration options that are not supported on that level yet.
For now you can try a couple of workaround based on types:
define some separate type or a wrapper (as example that one which extends AnyVal) and create a custom codec with different configuration for it
wrap optional fields into Option type and use a separated configuration withTransientNone for them.
Hello,
Is there a way I can choose which case class fields I want to appear in the resulting JSON as empty containers and which ones I don't want to appear at all, preferably without changing my case class field definitions? Much of this library is still pretty magical to me, so I don't know if I'm missing something obvious 😅
Thank you for your time and for the amazing library!
The text was updated successfully, but these errors were encountered: