Skip to content

JSON

Inbuilt JSON marshalling component: Transforms to and from JSON using the ultra-fast Jackson library

For more information about json-jackson: https://camel.apache.org/components/latest/dataformats/json-jackson-dataformat.html.

Example

Transforms the Log object emitted by the web3j component to a JSON string:

from("web3j://" + ethClientURL + "?address=" + contractAddress + "&operation=ETH_LOG_FLOWABLE")
    .marshal().json(JsonLibrary.Jackson)
    .to("p6cmb://scripts?platform6.request.action=execute&id=p6_demo.BlockchainEventHandler")
    .routeId("p6_demo Web3j - BlockchainEventHandler")
    .description("p6_demo Blockchain Event Handler")