---
title: Unmarshal and Marshal
description: Learn how to use EIPs
documentId: ipaas-eips-unmarshal-marshal
locale: en-US
---

**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.

<Callout type="tip" title="TIP">
* Unmarshal (input): **receive and process** (external → internal)  
* Marshal (output): **prepare and send** (internal → external)
</Callout>

To configure the **Unmarshal** and **Marshal** EIPs, select a data format in the **Data Format Type** field.  
Learn more about available [data formats](/docs/integrations/ipaas-data-formats).

## Example

<Steps>
<Step>
The flow starts with a PATCH request to the `/json` endpoint.
</Step>
<Step>
Then, it converts (unmarshals) the JSON request body to the internal format using the Jackson library.
</Step>
<Step>
Next, it logs the processed content.
</Step>
<Step>
Finally, it converts (marshals) the data to CSV, using a comma as the delimiter.
</Step>
</Steps>

```yaml
- from:
  uri: rest:patch:/json
  steps:
    - unmarshal:
      json:
      library: Jackson
    - log:
      message: "Output: ${body}"
    - marshal:
      csv:
      delimiter: ","
```
