2

I am using POJO un/marshalling via JAXB and EclipseLink MOXy and it works great for to/from JSON notation.

I also have a need to process a CSV file (well actually a pipe-delimited file, what do they call that?) where each row gets unmarshalled into my POJOs.

Perhaps some custom Adapter scheme perhaps? ( http://www.eclipse.org/eclipselink/documentation/2.4/moxy/advanced_concepts006.htm )

Alan Jurgensen
  • 813
  • 11
  • 20

2 Answers2

0

Currently EclipseLink MOXy supports XML and JSON. In order to support unmarshalling something like a delimited file, you could write something that converts the data to SAX events and then use that in combination with an UnmarshallerHandler obtained from the Unmarshaller.

bdoughan
  • 147,609
  • 23
  • 300
  • 400
-1

For prospective readers: you could consider to use Jackson with dataformat csv

Madhan
  • 5,750
  • 4
  • 28
  • 61
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes – zohar Jul 21 '15 at 06:13