Flat file to JSON

Description

Flatfile to JSON allows parsing and conversion of CSV and fixed-width flat files to JSON format.

Usage

Flat file to JSON is used to convert CSV and fixed-width flat file data into JSON output. The source data must be provided in the Content field, where the column headers are defined. This can be a reference to the flat file data inline, as shown above or provided from a previous step as shown below.

CSV example

Flat file to JSON content definition

Flat file example

Flat file to JSON content definition Flat file to JSON content definition

Using content from a previous step

Flat file to JSON content previous step

Advanced configuration: Flatpack PzMap Schema

Camel Flatpack schema can be used to define the column lengths for flat file data or define the column names for CSV & flat files, as shown in the Flatpack schema example below:

Flatpack schema

Also it can be used to define the column names for CSV data:

Flatpack schema

For more details, see the Flatpack header and trailer records documentation.

For more details on using Flatpack, see the Camel Flatpack documentation.