Unpack
Unpack is a Pipe for unpacking JSON or XML from $in.body (byte array) into a structured object $in.data. It is typically used after the HTTP Request pipe to process the response from an external service.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | JSON | Unpacking format: JSON or XML |
Possible Errors
$in.bodynot found$in.bodyis not a byte array- Invalid value of
params.type - Demarshalling error (incorrect data format)
Examples
Unpacking XML
{
"id": 10,
"type": "unpack",
"params": {
"type": "XML"
},
"outs": {
"success": 20,
"error": 1000
}
}
Unpacking JSON (default)
{
"id": 10,
"type": "unpack",
"outs": {
"success": 15,
"error": 1001
}
}