Skip to content

CsvToJsonConversion

pozil edited this page Oct 16, 2023 · 1 revision

CsvToJsonConversion

Demonstrates how to use DataWeave in Apex to convert CSV to JSON.For more DataWeave for Apex example head to https://github.com/developerforce/DataWeaveInApex

Group DataWeaveInApex Recipes

Methods

public static String convertCsvToJson(String csvPayload)

Demonstrates how to use DataWeave in Apex to convert a CSV to a JSON. The class uses the /dw/csvToJson.dwl script to convert CSV to JSON

Parameters

Param Description
csvPayload CSV data to convert to JSON

Returns

Type Description
String JSON string

Clone this wiki locally