hi, I have one question.
1:-
If I pass the cron_expression like this "* * * * ". It's saving as a struct in my database. Something like this ~e[/21 * * * * *].
But in order to consume from the frontend, I need to convert this struct to some other type.
So I tried this
- CronExpression.to_condition_list(availability.cron_expression) and this will give me something like this
[
minute: [{:/, :*, 21}],
hour: [:*],
day: [:*],
month: [:*],
weekday: [:*],
year: [:*]
]
but I'm not able to pass this in a JSON. In order to consume this, what data should I send? What should I do with struct?
Right now I'm getting this error when I'm trying to send after using the to_condition_list function.
** (Protocol.UndefinedError) protocol Jason.Encoder not implemented for {:minute, [{:/, :*, 21}]} of type Tuple, Jason.Encoder protocol must always be explicitly implemented.
hi, I have one question.
1:-
If I pass the cron_expression like this "* * * * ". It's saving as a struct in my database. Something like this ~e[/21 * * * * *].
But in order to consume from the frontend, I need to convert this struct to some other type.
So I tried this
but I'm not able to pass this in a JSON. In order to consume this, what data should I send? What should I do with struct?
Right now I'm getting this error when I'm trying to send after using the
to_condition_listfunction.** (Protocol.UndefinedError) protocol Jason.Encoder not implemented for {:minute, [{:/, :*, 21}]} of type Tuple, Jason.Encoder protocol must always be explicitly implemented.