Sry, to many things in parallel, in this case it was all about broken CSV, the broken JSONs were a different one.
Well, Scott, thank you for your answer. Unfortunately it just misses the point. This is not about creating JSONs, I know how to create valid JSONs, but as explained above, I get JSONs from an external company and I now know CSVWriter is not and will never be the tool to handle these files. Somewhat bad investment of my time. But maybe you are right, just don't expect me to be convinced.
Hello Scott, hello Andrew, thank you both for your answers. The problem is not reading into beans, the problem is reading broken CSVs. My code is as simple as, as much is done in the annotated Bean. public static void main(String[] args) throws IOException { // Locale.setDefault(Locale.ENGLISH); // to get Date parsing done. ArrayList<ChimeUsageBean> all = new ArrayList<>(); for(String arg : args) { System.out.println("*** "+arg); try { List<ChimeUsageBean> beans = new CsvToBeanBuilder(new FileReader(arg))...
Usually I am that low tech guy, doing it all in my code, but this time I tried to be smart and climb on the shoulders of giants, wrote a useful bean and applied opencsv. Was working nicely for a while, until that 3rd party missed the bug in their csv export . If only they had used opencsv for export. Now I am here with an opencsv solution that only works on old files. Do you want to tell me, I missed the API to simply push String[] myself into the opencsv bean machinery? So far I just let opencsv...
A Vote for Row Processing Modifying Field Structure.