I am trying to convert a csv file into JSON using Spring Integration but I could not find the suitable command in the xml file
I have csv file with header for example
empID, empName, dateOfBirth, Salary
1, Alice, 1990-05-14, 1000
2, Bob, 1991-06-15, 1100
3, Charlie, 1992-07-16, 1500
will become:
[
{
"ID": 1,
"Name": "Alice",
"dateOfBirth": "1990-05-14",
"Salary": 1000
},
{
"ID": 2,
"Name": "Bob",
"dateOfBirth": "1991-06-15",
"Salary": 1100
},
{
"ID": 3,
"Name": "Charlie",
"dateOfBirth": "1992-07-16",
"Salary": 1500
}
]
notice in the way i have also done some header name mapping "empID" become "ID" and "empName" become "Name"