Details
-
Enhancement
-
Resolution: Done
-
Major
-
camel-k-1.8.1
-
None
-
False
-
None
-
False
-
%
-
?
-
Todo
Description
Motivation
We need support for the template language jslt to transform/modify JSON data that comes in/out. It is very handy in KameletBindings where we would support transformations of JSON data using jslt-action because currently we require the correct format between data sources and data sinks.
Expected outcomes
https://camel.apache.org/camel-kamelets/0.8.x/jslt-action.html
Example of JSLT template:
{ "channel":"C03Q0ENEGAU", "text":"*"+.from.first_name+"@telegram*: "+.text }
Example of KameletBinding which use jslt-action:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: telegram-source
properties:
authorizationToken: "{{secret:stage1/telegram.token}}"
steps:
- ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: jslt-action
properties:
template: t2s.jslt
Preliminary analysis:
Tests: