JSON string to CSV and CSV to JSON conversion in c#
I'm working with JSON/CSV files in my asp.net web API project and tried with CSVHelper and ServiceStack.Text libraries but couldn't make it work. The JSON file containing an array is dynamic and may have any number of fields I read the file using streamreader and then need to convert it into CSV file to make it downloadable for end users. example file text [{"COLUMN1":"a","COLUMN2":"b","COLUMN3":"c","COLUMN4":"d","COLUMN5":"e"}, {"COLUMN1":"a","COLUMN2":"b","COLUMN3":"c","COLUMN4":"d","COLUMN5":"e"}] JSON to CSV public static string jsonStringToCSV(string content) { var jsonContent = (JArray