Questions tagged [csvmapper]

3 questions
2
votes
1 answer

Use Generics in Kotlin class for parsing CSV

I'm using CSVMapper in my kotlin code to parse a CSV file. Here's a sample code: data class UserDto(name: String): Serializable { } class CSVMigrator { private val csvFile: String private val csvMapper = CsvMapper().registerModule( …
Satyam
  • 15,493
  • 31
  • 131
  • 244
0
votes
0 answers

Java How to change headers after converting JSON to .CSV file using CsvSchema, CsvBuilder and CsvMapper

Problem is let's say the parameter Json String is { "FIRST_NAME":"Bob", "LAST_NAME": "Tuna" } in my myCsvHeaders.getList() method in the for loop, I would have to make 2 variables (basically matching the json key names, case sensitive so it…
rairai
  • 21
  • 6
0
votes
1 answer

Using CsvMapper in Kotlin to parse huge CSV file

I have a CSV file generated as a report by the server. The CSV file has more than 100k lines of text. I'm reading the file in Kotlin using CsvMapper, but I'm ending up with IOException. Here's the code that I'm implemented: //Declare the mapper…
Satyam
  • 15,493
  • 31
  • 131
  • 244