-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use default arguments when field is not provided #215
Comments
scalway
changed the title
Use default arguments when field not provided
Use default arguments when field is not provided
Apr 8, 2023
I am looking for a similar feature, where defaults can be omitted from configuration files. However, I wonder if this should only be done if the type is case class Foo(id:String, name:String = "optional") derives YamlCodec you have case class Foo(id:String, name:Option[String] = None) derives YamlCodec |
Ha, after wondering why I see code related to the functionality I am looking for, I've discovered that this was only recently added: 9054aff and not yet released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upickle
and some otherjson
libraries uses default arguments when field is not provided. It'll highly improve readability ofyaml
when you don't need to provide optional fields, and will give Devs much more flexibility.The text was updated successfully, but these errors were encountered: