cs-util-com / cscore

cscore is a minimal-footprint library providing commonly used helpers & patterns for your C# projects. It can be used in both pure C# and Unity projects.
https://cs-util-com.github.io/cscore/
Apache License 2.0
183 stars 31 forks source link

Extend the CsvParserTests to include a CSV to JSON conversion example #109

Closed cs-util closed 2 months ago

cs-util commented 11 months ago

Assuming that the parsed data that comes out of List<List<string>> parsedData = CsvParser.ReadCsvStream(stream) has its json keys in the first row and the values all in one row to X rows in the csv can be converted to X json objects to operate on these afterwards more easily. Create a xunit test in the CsvParserTests class to demonstrate this and potentially shape a few new helper methods to let developers easily do such a mapping process.