tags:

views:

51

answers:

1

We have a number of Scala classes returning Map[String,String] (key,value) results for storage in a NoSQL database. Some of the results are actually Map[String, List] or Map[String, ArrayBuffer], so we are using .toString on those objects to convert. This gives us output that looks like:

"ArrayBuffer(1,2,3,4)"

or

"List(1,2,4)"

Rather than include the object type, we'd like to have these written out as straight CSV, quotes and escaped characters as necessary. Is there a good CSV library that works well with Scala?

A: 

Here's a similar question, which ought to cover the CSV part. I have looked over Scala questions about csv, and there doesn't seem to be any suggestion of something that will create a csv, instead of just parsing it. So I'd look into the Java libraries.

Daniel