Registry / serialization / opencsv

opencsv

JSON →
library5.12.0javamavenunverified

A simple library for reading and writing CSV files in Java with support for beans, headers, and custom mappings.

<dependency> <groupId>com.opencsv</groupId> <artifactId>opencsv</artifactId> <version>5.12.0</version> </dependency>
INSTALL
IMPORT
SIG · OPENCSV
O
opencsv
serializationjavav5.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CSVReader
com.opencsv.CSVReader

Minimal example showing how to read a CSV string using CSVReader.

import com.opencsv.CSVReader; import java.io.StringReader; public class Quickstart { public static void main(String[] args) throws Exception { String csvData = "name,age\nJohn,30\nJane,25"; CSVReader reader = new CSVReader(new StringReader(csvData)); String[] nextLine; while ((nextLine = reader.readNext()) != null) { System.out.println(nextLine[0] + " - " + nextLine[1]); } reader.close(); } }
Debug
Known issues
breakingOpenCSV 5.x changed the default separator from comma to comma (no change) but introduced breaking changes in bean mapping annotations.
fix
If upgrading from 4.x, review bean mapping annotations and update to use @CsvBindByPosition or @CsvBindByName as needed.
affects: >=5.0.0
Upgrade
Version history
5.12.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
opencsv — mvn dependency:get opencsv · libregistry