Skip to main content

Module decode

Module decode 

Source
Expand description

Response-decode pipeline (#515).

A declarative chain applied to the raw response body before record extraction, so a source can consume payloads that aren’t plain JSON — including files embedded in a JSON/SOAP envelope:

decode:
  - extract: "$.d.reportBytes"          # pull a field out of the envelope
  - base64                               # base64 → bytes
  - unzip: { member: "*.csv" }           # or `gunzip`
  - parse: { format: csv, has_headers: true }

Steps compose left-to-right over a byte buffer; the terminal parse step turns the bytes into records. Without an explicit parse, the bytes are parsed as JSON.

Structs§

ParseSpec
Parse the decoded bytes into records.
UnzipSpec
Select a member of a zip archive.

Enums§

DecodeStep
One step of the decode chain.
ParseFormat
Final-parse format for a decode chain.
SimpleStep
A byte-chain step with no parameters (- base64, - gunzip).

Functions§

run_decode
Run the decode chain over the response body, returning records.