I created a ticket for it:

https://issues.apache.org/jira/browse/CAMEL-19276

--
James

On Tue, 18 Apr 2023 at 12:57, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> Maybe we should include that -extra out of the box in camel-jq
>
> On Tue, Apr 18, 2023 at 1:02 PM James Netherton <jamesnether...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Have you added jackson-jq-extra to the application classpath?
> >
> > --
> > James
> >
> > On Mon, 17 Apr 2023 at 16:32, Mikael Koskinen <mijap...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > When using the following JQ expression:
> > >
> > > now | strftime("%Y-%d-%m")
> > >
> > > I get the following error:
> > >
> > >   CaughtExceptionType: org.apache.camel.RuntimeCamelException
> > > CaughtExceptionMessage:
> > > net.thisptr.jackson.jq.exception.JsonQueryException: Function
> > > strftime/1 does not exist  StackTrace:
> > > org.apache.camel.RuntimeCamelException:
> > > net.thisptr.jackson.jq.exception.JsonQueryException: Function
> > > strftime/1 does not exist
> > >         at
> > >
> org.apache.camel.language.jq.JqExpression.evaluate(JqExpression.java:198)
> > >         at
> > >
> >
> org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
> > >
> > > I checked the following project (which I think Camel uses?)
> > > https://github.com/eiiches/jackson-jq and based on the documentation,
> > > I think it should support strftime:
> > >
> > >
> > >
> >
> https://github.com/eiiches/jackson-jq/blob/ad9dba1eb618640cf8c72634a5ee99c04ddc8e5b/README.md?plain=1#L530
> > >
> > > Also tested in this format but same issue:
> > >
> > > strftime("yyyy-MM-dd")
> > >
> > > Here's a link to jqplayground which shows how the function should work:
> > >
> > > https://jqplay.org/s/tl0HuDi71wF
> > >
> > > Best regards,
> > > Mikael
> > >
> >
>
>
> --
> Claus Ibsen
> -----------------
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Reply via email to