object Encoder extends LowPrioEncoders
- Alphabetic
- By Inheritance
- Encoder
- LowPrioEncoders
- TupleEncoders
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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.
- trait DefaultValueAware[T] extends Encoder[T]
An Encoder that might change its encoding strategy if T has a default value.
- implicit final class EncoderOps[A] extends AnyVal
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[T](implicit encoder: Encoder[T]): Encoder[T]
Creates an Encoder from the given function.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def forArray[T](implicit arg0: Encoder[T]): Encoder[Array[T]]
- implicit val forBigDecimal: Encoder[BigDecimal]
- implicit val forBigInt: Encoder[BigInt]
- implicit val forBoolean: Encoder[Boolean]
- implicit def forBoxedBoolean: Encoder[Boolean]
- implicit def forBoxedByte: Encoder[Byte]
- implicit def forBoxedChar: Encoder[Character]
- implicit def forBoxedDouble: Encoder[Double]
- implicit def forBoxedFloat: Encoder[Float]
- implicit def forBoxedInt: Encoder[Integer]
- implicit def forBoxedLong: Encoder[Long]
- implicit def forBoxedShort: Encoder[Short]
- implicit val forByte: Encoder[Byte]
- def forByteArray(jsonBaseEncoding: BaseEncoding): Encoder[Array[Byte]]
- implicit val forByteArrayDefault: Encoder[Array[Byte]]
- implicit val forByteArrayIterator: Encoder[Iterator[Array[Byte]]]
- implicit def forBytesIterator[Bytes](implicit arg0: ByteAccess[Bytes]): Encoder[Iterator[Bytes]]
- implicit val forChar: Encoder[Char]
- implicit val forDouble: Encoder[Double]
- implicit val forFloat: Encoder[Float]
- implicit def forIndexedSeq[T, M[X] <: IndexedSeq[X]](implicit arg0: Encoder[T]): DefaultValueAware[M[T]]
- implicit val forInt: Encoder[Int]
- implicit final def forIterableOnce[T, M[X] <: XIterableOnceBound[X]](implicit arg0: Encoder[T]): Encoder[M[T]]
- Definition Classes
- LowPrioEncoders
- implicit final def forIterator[T](implicit arg0: Encoder[T]): Encoder[Iterator[T]]
- Definition Classes
- LowPrioEncoders
- implicit val forJBigDecimal: Encoder[BigDecimal]
- implicit val forJBigInteger: Encoder[BigInteger]
- implicit def forLinearSeq[T, M[X] <: LinearSeq[X]](implicit arg0: Encoder[T]): DefaultValueAware[M[T]]
- implicit val forLong: Encoder[Long]
- implicit def forMap[A, B, M[X, Y] <: Map[X, Y]](implicit arg0: Encoder[A], arg1: Encoder[B]): DefaultValueAware[M[A, B]]
- implicit val forNull: Encoder[Null]
- implicit def forOption[T](implicit arg0: Encoder[T]): DefaultValueAware[Option[T]]
- implicit val forShort: Encoder[Short]
- implicit val forString: Encoder[String]
- implicit val forStringIterator: Encoder[Iterator[String]]
- implicit def forTuple1[T1](implicit arg0: Encoder[T1]): Encoder[(T1)]
- Definition Classes
- TupleEncoders
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- implicit def forTuple2[T1, T2](implicit arg0: Encoder[T1], arg1: Encoder[T2]): Encoder[(T1, T2)]
- Definition Classes
- TupleEncoders
- 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
- 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
- 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
- implicit def forTuple3[T1, T2, T3](implicit arg0: Encoder[T1], arg1: Encoder[T2], arg2: Encoder[T3]): Encoder[(T1, T2, T3)]
- Definition Classes
- TupleEncoders
- 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
- 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
- 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
- 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
- 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
- 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
- implicit val forUnit: Encoder[Unit]
- 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). - 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.
- implicit def fromCodec[T](implicit codec: Codec[T]): Encoder[T]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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.
- def toString(): String
- Definition Classes
- AnyRef → Any
- def toStringEncoder[T]: Encoder[T]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object ForEither
The default Encoder for Either is not automatically in scope, because there is no clear "standard" way of encoding instances of Either.
- object StringBooleans
- object StringNulls
- object StringNumbers
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated