Configuring the components - Cloud - 8.0
JSON processing (Mediation)
- Version
- Cloud
- 8.0
- Language
- English
- Product
- Talend Data Fabric
- Talend Data Services Platform
- Talend ESB
- Talend MDM Platform
- Talend Open Studio for ESB
- Talend Real-Time Big Data Platform
- Module
- Talend Studio
- Content
- Data Governance > Third-party systems > Processing components (Mediation) > JSON processing components (Mediation)
- Data Quality and Preparation > Third-party systems > Processing components (Mediation) > JSON processing components (Mediation)
- Design and Development > Third-party systems > Processing components (Mediation) > JSON processing components (Mediation)
Procedure
-
Double-click the cTimer
component to display its Basic settings view in
the Component tab.
-
In the Repeat field, enter 1 to trigger a message. Keep the default settings of the other
options.
-
Double-click the cSetBody component to display its
Basic settings view in the Component
tab.
-
Select Constant in the Language list
and enter the JSON string
"{\"firstName\": \"Mike\", \"lastName\":
\"Jonson\", \"age\": 74, \"job\": \"artist\" }"
in the
Expression field.
-
Double-click the cJsonParser
component to display its Basic settings view in
the Component tab.
-
Select Gson in the JSON
Library list and enter
java.util.Map.class
in the
Mapping Class field to parse the JSON string into a Java
map.
-
Double-click a cLog component to display its
Basic settings view in the Component
tab.
-
Configure the properties as follows:
-
Select the Format the log output option.
-
In the Arguments table, click
[+] to add a row. Enter
"multiline" in the Name field
and true in the value
field.
-
Keep the default settings of the other options.
-
Repeat this step to configure the other cLog component in
the same way.
-
Double-click the cJsonWriter
component to display its Basic settings view in
the Component tab.
-
In the JSON Library list, select
Jackson to write the Java map into JSON using the Jackson
library.
-
Press Ctrl+S to save your
Route.