re: Java Code Review - CSV4J VIEW POST

re: Hi Omar. I had a look at the README and several things weren't clear to me. Why do you need an CSV ID and CSV values? What are the values in the...

Thank you very much for checking it out.
So the main reason why we needed this at my last job, is that we came across cases where we didn't know what is the exact structure of the CSV file.

That's because of two main reasons. First, there are known columns they needed to be removed from the CSV file in case they where all null. Second, there are some columns that will be defined in the runtime and we don't know what are their names neither their count.

We did check the popular Java CSV libraries, but we failed to find one that is easy to use and satisfies our needs. That's why I decided to write this lightweight library that I hope it will facilitate the process.


Hi Omar. I found the root of my confusion. There are some annotations/classes that are provided by your library (e.g. CJIgnore). There are also some classes that are part of the example and need to be provided by the library user (like CJModel).

So you chose pretty abstract and similar names. It would be much more understandable if you picked completely different names for the example, that people can relate to.

For example, you could start like: „Say you‘ve got a list of products, and you want to export them to a CSV file. Each product is exported as a row.“ ...

Then you show the Product class with the the CJ... annotations. Currently, you don’t describe all the annotations- that could be improved as well.

The exported table example should match the code. Currently, you‘ve got one CJModel in the code, but to rows in the table.

Maybe there’s a better example then Product...

code of conduct - report abuse