1. Home
  2. ...
  3. EIPs
  4. Unmarshal and Marshal

Unmarshal and Marshal

Learn how to use EIPs

Unmarshal and Marshal are opposite data transformation processes, essential for data handling and interoperability between systems:

  • Unmarshal (input): converts data received in an external format (JSON, XML, CSV) to Camel's internal format. Use when you need to process data coming from APIs, files, or external messages.

  • Marshal (output): converts data from Camel's internal format to a standardized external format (JSON, XML, CSV). Use when you need to send data to APIs, save to files, or transmit to external systems.

TIP
  • Unmarshal (input): receive and process (external → internal)
  • Marshal (output): prepare and send (internal → external)

To configure the Unmarshal and Marshal EIPs, select a data format in the Data Format Type field.
Learn more about available data formats.

Example

The flow starts with a PATCH request to the /json endpoint.

Then, it converts (unmarshals) the JSON request body to the internal format using the Jackson library.

Next, it logs the processed content.

Finally, it converts (marshals) the data to CSV, using a comma as the delimiter.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more