Class CsvParser

All Implemented Interfaces:
CsvMetaProvider, RecordReadable

public class CsvParser extends ReaderParser implements CsvMetaProvider, RecordReadable
Parses CSV (Comma Separated Values) input into Java objects.

Parses RFC 4180-compliant CSV into collections of beans, maps, or simple values. Each row becomes an element; the header row defines column names.

JSON Parity Features (opt-in):
Data Structures Not Supported:
  • Parent/inherited properties — Bean hierarchy cannot be reconstructed from flat columns.
  • Optional wrappers — Round-trip may differ from tree formats.
Best Supported:

Parsing into Collection of flat beans or maps, or single beans/maps with simple property types (primitives, strings, numbers, enums, dates, byte arrays, or nested structures when enabled).

Example input (list of maps with a,b):

a,b foo,bar

Complex (list of beans with nested address, flattened):

name,age,address_street,address_city,address_state,tags Alice,30,123 Main St,Boston,MA,"a,b,c"

Notes:
  • This class is thread safe and reusable.