Skip to content
The JSaPar example project containing all the examples on how to use the JSaPar library to its fullness.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
NOTICE
README.md
pom.xml

README.md

License Build Status JSaPar Status

Java 8 Java 9-ea Java 9-ea

JSaPar Examples

The JSaPar Example project containing all the examples on how to use the JSaPar library to its full potential.

Examples are listed in packages where each package contains one example class plus all files necessary to run that example. Each example class can however contain more than one example method.

Introduction

a1 Simple parse and compose

  • Parsing simple unquoted CSV into internal Document structure.
  • Composing simple unquoted CSV based on same schema.

Basics

b1 Simple convert

  • Converting CSV into fixed width format using one schema for each.

b2 Convert CSV to Java Beans

  • Converting CSV into Java Beans using lambda.
  • Converting CSV into Java Beans using RecordingBeanEventListener.

b3 Convert Java Beans to CSV

  • Converting Java Beans one by one into CSV.
  • Converting a collection of Java Beans into CSV.

b4 Manipulating and filtering

  • Manipulating and filtering while converting CSV into fixed width format.

Schema basics

c1 Line condition cells

  • Parsing of CSV file where first cell denotes the type of the line to be parsed.
  • Parsing of fixed width file where first cell denotes the type of the line to be parsed.
  • Converting from fixed width file to CSV file where first cell denotes the type of the line to be converted.

c2 Empty cell pattern

  • Parsing of CSV file where the schema of a cell has a pattern that if the content matches, the content is regarded as empty.

c3 Quoting

  • Parsing of CSV file where the schema specifies a quote character and where some of the cells are quoted.
  • Composing of CSV where the schema specifies that one of the cells should always be quoted and where other cells are automatically quoted when needed.
You can’t perform that action at this time.