Types Supported Out-of-the-Box

borer comes with built-in encoding and decoding support for arbitrary combinations of the following types:

  • Boolean, Char, Byte, Short Int, Long, Float, Double and their boxed counterparts
  • Null
  • String
  • Array[Byte]
  • java.math.BigInteger, java.math.BigDecimal and their scala wrappers BigInt and BigDecimal
  • Option[T]
  • Array[T]
  • M[T] <: Iterable[T]
  • M[A, B] <: Map[A, B]
  • Iterator[T] (encoding only!)
  • Either[A, B] (with import io.bullet.borer.Codec.ForEither.default)
  • T <: Tuple
  • T <: scala.reflect.Enum

All these type are encoded to exactly one CBOR or JSON data item (which may of course be an array or map consisting of other, nested data items.)