object Encoder extends LowPrioEncoders

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Encoder
  2. LowPrioEncoders
  3. TupleEncoders
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class ConcatEncoder[T] extends Encoder[T]

    Creates a new Encoder which emits the flat, concatenated encoding of two other encoders.

    Creates a new Encoder which emits the flat, concatenated encoding of two other encoders. Only works with encoders that encode to arrays or maps and both encoders must be of the same type, i.e. both encode to an array or both encode to a map. If the encoders are incompatible or produce elements that are not wrapped in an array or map each encoding attempt will fail with a Borer.Error.Unsupported exception.

  2. trait DefaultValueAware[T] extends Encoder[T]

    An Encoder that might change its encoding strategy if T has a default value.

  3. implicit final class EncoderOps[A] extends AnyVal
  4. trait PossiblyWithoutOutput[T] extends Encoder[T]

    An Encoder that might not actually produce any output for certain values of T (e.g.

    An Encoder that might not actually produce any output for certain values of T (e.g. because "not-present" already carries sufficient information).

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[T](implicit encoder: Encoder[T]): Encoder[T]

    Creates an Encoder from the given function.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. implicit def forArray[T](implicit arg0: Encoder[T]): Encoder[Array[T]]
  10. implicit val forBigDecimal: Encoder[BigDecimal]
  11. implicit val forBigInt: Encoder[BigInt]
  12. implicit val forBoolean: Encoder[Boolean]
  13. implicit def forBoxedBoolean: Encoder[Boolean]
  14. implicit def forBoxedByte: Encoder[Byte]
  15. implicit def forBoxedChar: Encoder[Character]
  16. implicit def forBoxedDouble: Encoder[Double]
  17. implicit def forBoxedFloat: Encoder[Float]
  18. implicit def forBoxedInt: Encoder[Integer]
  19. implicit def forBoxedLong: Encoder[Long]
  20. implicit def forBoxedShort: Encoder[Short]
  21. implicit val forByte: Encoder[Byte]
  22. def forByteArray(jsonBaseEncoding: BaseEncoding): Encoder[Array[Byte]]
  23. implicit val forByteArrayDefault: Encoder[Array[Byte]]
  24. implicit val forByteArrayIterator: Encoder[Iterator[Array[Byte]]]
  25. implicit def forBytesIterator[Bytes](implicit arg0: ByteAccess[Bytes]): Encoder[Iterator[Bytes]]
  26. implicit val forChar: Encoder[Char]
  27. implicit val forDouble: Encoder[Double]
  28. implicit val forFloat: Encoder[Float]
  29. implicit def forIndexedSeq[T, M[X] <: IndexedSeq[X]](implicit arg0: Encoder[T]): DefaultValueAware[M[T]]
  30. implicit val forInt: Encoder[Int]
  31. implicit final def forIterableOnce[T, M[X] <: XIterableOnceBound[X]](implicit arg0: Encoder[T]): Encoder[M[T]]
    Definition Classes
    LowPrioEncoders
  32. implicit final def forIterator[T](implicit arg0: Encoder[T]): Encoder[Iterator[T]]
    Definition Classes
    LowPrioEncoders
  33. implicit val forJBigDecimal: Encoder[BigDecimal]
  34. implicit val forJBigInteger: Encoder[BigInteger]
  35. implicit def forLinearSeq[T, M[X] <: LinearSeq[X]](implicit arg0: Encoder[T]): DefaultValueAware[M[T]]
  36. implicit val forLong: Encoder[Long]
  37. implicit def forMap[A, B, M[X, Y] <: Map[X, Y]](implicit arg0: Encoder[A], arg1: Encoder[B]): DefaultValueAware[M[A, B]]
  38. implicit val forNull: Encoder[Null]
  39. implicit def forOption[T](implicit arg0: Encoder[T]): DefaultValueAware[Option[T]]
  40. implicit val forShort: Encoder[Short]
  41. implicit val forString: Encoder[String]
  42. implicit val forStringIterator: Encoder[Iterator[String]]
  43. implicit def forTuple1[T1](implicit arg0: Encoder[T1]): Encoder[(T1)]
    Definition Classes
    TupleEncoders
  44. implicit def forTuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)]
    Definition Classes
    TupleEncoders
  45. implicit def forTuple11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)]
    Definition Classes
    TupleEncoders
  46. implicit def forTuple12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)]
    Definition Classes
    TupleEncoders
  47. implicit def forTuple13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)]
    Definition Classes
    TupleEncoders
  48. implicit def forTuple14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)]
    Definition Classes
    TupleEncoders
  49. implicit def forTuple15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)]
    Definition Classes
    TupleEncoders
  50. implicit def forTuple16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)]
    Definition Classes
    TupleEncoders
  51. implicit def forTuple17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)]
    Definition Classes
    TupleEncoders
  52. implicit def forTuple18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17], arg17: Encoder[T18]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)]
    Definition Classes
    TupleEncoders
  53. implicit def forTuple19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17], arg17: Encoder[T18], arg18: Encoder[T19]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)]
    Definition Classes
    TupleEncoders
  54. implicit def forTuple2[T1, T2](implicit arg0: Encoder[T1], arg1: Encoder[T2]): Encoder[(T1, T2)]
    Definition Classes
    TupleEncoders
  55. implicit def forTuple20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17], arg17: Encoder[T18], arg18: Encoder[T19], arg19: Encoder[T20]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)]
    Definition Classes
    TupleEncoders
  56. implicit def forTuple21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17], arg17: Encoder[T18], arg18: Encoder[T19], arg19: Encoder[T20], arg20: Encoder[T21]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)]
    Definition Classes
    TupleEncoders
  57. implicit def forTuple22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9], arg9: Encoder[T10], arg10: Encoder[T11], arg11: Encoder[T12], arg12: Encoder[T13], arg13: Encoder[T14], arg14: Encoder[T15], arg15: Encoder[T16], arg16: Encoder[T17], arg17: Encoder[T18], arg18: Encoder[T19], arg19: Encoder[T20], arg20: Encoder[T21], arg21: Encoder[T22]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)]
    Definition Classes
    TupleEncoders
  58. implicit def forTuple3[T1, T2, T3](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3]): Encoder[(T1, T2, T3)]
    Definition Classes
    TupleEncoders
  59. implicit def forTuple4[T1, T2, T3, T4](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4]): Encoder[(T1, T2, T3, T4)]
    Definition Classes
    TupleEncoders
  60. implicit def forTuple5[T1, T2, T3, T4, T5](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5]): Encoder[(T1, T2, T3, T4, T5)]
    Definition Classes
    TupleEncoders
  61. implicit def forTuple6[T1, T2, T3, T4, T5, T6](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6]): Encoder[(T1, T2, T3, T4, T5, T6)]
    Definition Classes
    TupleEncoders
  62. implicit def forTuple7[T1, T2, T3, T4, T5, T6, T7](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7]): Encoder[(T1, T2, T3, T4, T5, T6, T7)]
    Definition Classes
    TupleEncoders
  63. implicit def forTuple8[T1, T2, T3, T4, T5, T6, T7, T8](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8)]
    Definition Classes
    TupleEncoders
  64. implicit def forTuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3], arg3: Encoder[T4], arg4: Encoder[T5], arg5: Encoder[T6], arg6: Encoder[T7], arg7: Encoder[T8], arg8: Encoder[T9]): Encoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]
    Definition Classes
    TupleEncoders
  65. implicit val forUnit: Encoder[Unit]
  66. def from[T](unapply: (T) => Boolean): Encoder[T]

    Same as the other from overload above, but for nullary case classes (i.e.

    Same as the other from overload above, but for nullary case classes (i.e. with an empty parameter list).

  67. def from[T, Unapplied](unapply: (T) => Option[Unapplied])(implicit tupleEnc: Encoder[Unapplied]): Encoder[T]

    Allows for somewhat concise Encoder definition for case classes, without any macro magic.

    Allows for somewhat concise Encoder definition for case classes, without any macro magic. Can be used e.g. like this:

    case class Foo(int: Int, string: String, doubleOpt: Option[Double])
    
    val fooEncoder = Encoder.from(Foo.unapply _)

    Encodes an instance as a simple array of values.

  68. implicit def fromCodec[T](implicit codec: Codec[T]): Encoder[T]
  69. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  70. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  71. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  72. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  75. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  76. def targetSpecific[T](cbor: Encoder[T], json: Encoder[T]): Encoder[T]

    Creates a "unified" Encoder from two encoders that each target only a single data format.

  77. def toString(): String
    Definition Classes
    AnyRef → Any
  78. def toStringEncoder[T]: Encoder[T]
  79. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  80. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  81. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  82. object ForEither

    The default Encoder for Either is not automatically in scope, because there is no clear "standard" way of encoding instances of Either.

  83. object StringBooleans
  84. object StringNulls
  85. object StringNumbers

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from LowPrioEncoders

Inherited from TupleEncoders

Inherited from AnyRef

Inherited from Any

Ungrouped