-
Notifications
You must be signed in to change notification settings - Fork 175
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 a Cron4s config writer #457
Add a Cron4s config writer #457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, @alonsodomin!
ConfigReader.fromString(str => | ||
Cron.parse(str).fold( | ||
err => Left(CannotConvert(str, "CronExpr", err.getMessage)), | ||
cronExpr => Right(cronExpr))) | ||
|
||
implicit val cronExprConfigWriter: ConfigWriter[CronExpr] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you combine the reader and writer parts in a ConfigConvert
? You should be able to do that easily with ConfigConvert.viaString
(see pureconfig-joda for examples).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruippeixotog thanks to the pointer to ConfigConvert
, wasn't aware of its existance. Should be sorted now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for this, @alonsodomin!
@alonsodomin Thanks for your contribution. Please consider sending a PR to add yourself to the pureconfig contributors list. |
No description provided.