kantan.csv.ops
Members list
Type members
Classlikes
Provides syntax for decoding CSV cells as values.
Provides syntax for decoding CSV cells as values.
Importing kantan.csv.ops._
will add the following methods to String
:
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for encoding values as CSV cells.
Provides syntax for encoding values as CSV cells.
Importing kantan.csv.ops._
will add asCsvCell to any type A
such that there exists an implicit CellDecoder[A]
in scope.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for decoding CSV rows as values.
Provides syntax for decoding CSV rows as values.
Importing kantan.csv.ops._
will add the following methods to Seq[String]
:
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for encoding values as CSV rows.
Provides syntax for encoding values as CSV rows.
Importing kantan.csv.ops._
will add asCsvRow to any type A
such that there exists an implicit RowEncoder[A]
in scope.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for decoding a string as a CSV row.
Provides syntax for decoding a string as a CSV row.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for encoding single CSV rows as a string.
Provides syntax for encoding single CSV rows as a string.
Writing a single row as a String
is a surprisingly recurrent feature request. This is how to do it:
scala> import kantan.csv.rfc
scala> (1, 2, 3).writeCsvRow(rfc)
res0: String = 1,2,3
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides syntax for turning collections into CSV strings.
Provides syntax for turning collections into CSV strings.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Provides useful syntax for types that have implicit instances of CsvSink in scope.
Provides useful syntax for types that have implicit instances of CsvSink in scope.
The most common use case is to turn a value into a CsvWriter:
val f: java.io.File = ???
f.asCsvWriter[List[Int]](',', true)
A slightly less common use case is encode an entire collection to CSV:
val f: java.io.File = ???
f.writeCsv[List[Int]](List(List(1, 2, 3), List(4, 5, 6)), ',', true)
Attributes
- Supertypes
Provides useful syntax for types that have implicit instances of CsvSource in scope.
Provides useful syntax for types that have implicit instances of CsvSource in scope.
The most common use case is to turn a value into a CsvReader:
scala> import kantan.csv._
scala> "1,2,3\n4,5,6".asCsvReader[List[Int]](rfc).toList
res0: List[ReadResult[List[Int]]] = List(Right(List(1, 2, 3)), Right(List(4, 5, 6)))
A slightly less common use case is to load an entire CSV file in memory:
scala> "1,2,3\n4,5,6".readCsv[List, List[Int]](rfc)
res1: List[ReadResult[List[Int]]] = List(Right(List(1, 2, 3)), Right(List(4, 5, 6)))
Unsafe versions of these methods are also available, even if usually advised against.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object cellDecoder
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object cellEncoder
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object rowDecoder
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object rowEncoder
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object csvRows
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object sink
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object source
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class CsvSinkOps[A]
- Self type
-
CsvSinkOps[A]
Attributes
- Supertypes
- Self type
-
cellDecoder.type
Attributes
- Supertypes
- Self type
-
cellEncoder.type
Attributes
- Supertypes
- Self type
-
csvRows.type
Attributes
- Supertypes
- Self type
-
rowDecoder.type
Attributes
- Supertypes
- Self type
-
rowEncoder.type
Attributes
- Supertypes
- Self type
-
sink.type
Attributes
- Supertypes
- Self type
-
source.type
Implicits
Inherited implicits
Attributes
- Inherited from:
- ToCsvCellDecoderOps
Attributes
- Inherited from:
- ToCsvCellEncoderOps
Attributes
- Inherited from:
- ToCsvSourceOps
Attributes
- Inherited from:
- ToCsvSinkOps
Attributes
- Inherited from:
- ToCsvRowDecoderOps
Attributes
- Inherited from:
- ToCsvRowEncoderOps
Attributes
- Inherited from:
- ToCsvRowReadingOps
Attributes
- Inherited from:
- ToCsvRowWritingOps
Attributes
- Inherited from:
- ToCsvRowsOps