CSV to JSON
Description
This operation converts a CSV file to JSON format.
Data types
These are the input/output expected data types for this operation:
Input data
- CSV-formatted strings you want to transform into JSON.
Output data
- Resulting JSON-formatted strings.
Parameters
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Format*
Format of the resulting JSON. Choose between:
Array of dictionaries - Each row in the CSV is converted into an object (similar to a dictionary) with key-value pairs where the keys are column headers.
Array of arrays - Each row in the CSV is converted into a JSON array, with values only and no keys (useful if you don’t need named fields).
Example
Suppose you want to convert a series of events in CSV format into JSON:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose CSV to JSON.
Set Cell delimiter to
,(comma).Leave the Row delimiter field empty.
Set Format to Array of dictionaries.
Give your Output field a name and click Save. The CSV strings in your input field will be transformed into JSON.
For example, the following CSV:
will be transformed into this JSON:
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.
Last updated
Was this helpful?

