# cJSLT

Uses [JSLT templates](https://github.com/schibsted/jslt) to transform JSON messages.

For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.

## cJSLT Standard properties

These properties are used to configure cJSLT running in the Standard Job framework.

The Standard cJSLT component belongs to the Transformation family.

## Basic settings

| Properties | Description |
| --- | --- |
| Type | Select the way the JSLT template will be set.<br><br><ul> <li> <p> <span>Repository</span>: The JSLT template will be selected                           from an existing repository resource file.</p> </li> <li> <p> <span>File Path</span>: The JSLT template will be selected from                           the local file system.</p> </li> <li> <span>Built-In</span>: The JSLT template will be entered directly                        within the component.</li> </ul> |
| Resource / Version | This field appears when Repository is selected from the<br>Type list. Click [...] and select the resource file containing the JSLT<br>template. Select the version of the resource if more than one version of the<br>resource is available. |
| Resource URI | This field appears when File Path is selected from the<br>Type list. Enter the path to the JSLT template file<br>in your local file system. |
| Cache Resource | This option appears when Repository or<br>File Path is selected from the<br>Type list. Select this check box to cache the<br>resource instead of reloading it for each message. |
| Language | This option appears when Built-In is selected from<br>the Type list.<br><br>Select the language of the expression you<br>use from None, Bean,<br>Constant, CorrelationID,<br>EL, Groovy,<br>Header, JoSQL,<br>JSonPath, JXPath,<br>MVEL, OGNL,<br>PHP, Property,<br>Python, Ruby,<br>Simple, SpEL,<br>SQL, XPath, and<br>XQuery.<br><br>Select Bean if<br>you want to call a predefined Java Bean to return the JSLT<br>template. |
| Code Style | This option appears when Built-In is<br>selected from the Type list. Select from:<br><br><ul> <li> <span>Java</span>: Java code can be used within JSLT template.                           Quotes needs to be escaped, for example, <span>\"</span>.</li> <li> <span>Native</span>: No Java code can be used in JSLT                           template. But quotes do not need be escaped, making the JSLT template                           more readable.</li> </ul> |
| JSLT template | This option appears when Built-In is<br>selected from the Type list. Enter the JSLT template to<br>be applied on incoming JSON messages.<br><br>For more information about how to use the languages to create an expression,<br>see the site http://camel.apache.org/languages.html. |
| Pretty Print | Select this check box to format and print the output JSON message in a readable<br>way. If you clear this check box, you will have the output in one row. |

## Advanced settings

| Properties | Description |
| --- | --- |
| URI Options | Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the<br>table. Then click the corresponding value field and enter a value. See the site<br>https://camel.apache.org/components/3.21.x/jslt-component.html for available URI options. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cJSLT can be a middle or end component in<br>a Route. |
| Limitation | The input content needs to be in JSON format. |

**Related concepts**

* [Transforming message between JSON formats using JSLT expression](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-json-processing/cjslt-transforming-message-between-json-formats-using-jslt-expression)