Converting csv row to JSON object in Java

Gaulpnand

New Member
I've a csv file something similar to this "name.firstName","name.givenName","name.DisplayName","phone.type","phone.value""john","maverick","John Maverick","mobile","123-123-123""jim","lasher","Jim Lasher","mobile","123-123-123"I want to convert the 2nd and 3rd row into JSON objects.Using the first row as Header. So the result will be\[code\][{ "name": { "firstName": "john", "givenName": "maverick", "DisplayName": "John Maverick"},"phone": { "type": "mobile", "value": "123-123-123"}},{"name": { "firstName": "john", "givenName": "maverick", "DisplayName": "John Maverick"},"phone": { "type": "mobile", "value": "123-123-123"}]\[/code\]Any idea how to achieve this?
 
Back
Top