object Codec extends CodecExtensions with FormCodecMacros with LowPriorityCodec
- Alphabetic
- By Inheritance
- Codec
- LowPriorityCodec
- FormCodecMacros
- CodecExtensions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
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 anyStringCodec[T, CF <: CodecFormat](cf: CF)(_rawDecode: (String) => DecodeResult[T])(_encode: (T) => String)(implicit arg0: Schema[T]): Codec[String, T, CF]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit val bigDecimal: Codec[String, BigDecimal, TextPlain]
- implicit val bigInt: Codec[String, BigInt, TextPlain]
- implicit def binaryOrCloseWebSocketFrameCodec[A, CF <: CodecFormat](implicit byteArrayCodec: Codec[Array[Byte], A, CF]): Codec[WebSocketFrame, Option[A], CF]
A codec which expects only binary and close frames (all other frames cause a decoding error).
A codec which expects only binary and close frames (all other frames cause a decoding error). Close frames correspond to
None
, while text frames are handled using the givenbyteArrayCodec
and wrapped withSome
. - implicit def binaryWebSocketFrameCodec[A, CF <: CodecFormat](implicit byteArrayCodec: Codec[Array[Byte], A, CF]): Codec[WebSocketFrame, A, CF]
A codec which expects only binary frames (all other frames cause a decoding error) and handles the text using the given
byteArrayCodec
. - implicit val boolean: Codec[String, Boolean, TextPlain]
- implicit val byte: Codec[String, Byte, TextPlain]
- implicit val byteArray: Codec[Array[Byte], Array[Byte], OctetStream]
- implicit val byteBuffer: Codec[ByteBuffer, ByteBuffer, OctetStream]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- implicit val cookieCodec: Codec[String, List[Cookie], TextPlain]
- implicit val cookieWithMetaCodec: Codec[String, CookieWithMeta, TextPlain]
- implicit val cookiesCodec: Codec[List[String], List[Cookie], TextPlain]
- implicit val cookiesWithMetaCodec: Codec[List[String], List[CookieWithMeta], TextPlain]
- implicit val date: Codec[String, Date, TextPlain]
- implicit val double: Codec[String, Double, TextPlain]
- implicit val duration: Codec[String, Duration, TextPlain]
- def eitherLeft[L, A, B, CF <: CodecFormat](c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]
Create a codec which during decoding, first tries to decode values on the left using
c1
.Create a codec which during decoding, first tries to decode values on the left using
c1
. If this fails for any reason, decoding is done usingc2
. Both codecs must have the same low-level values and formats.For a right-biased variant see Codec.eitherRight.
The schema is defined to be an either schema as created by Schema.schemaForEither.
- Definition Classes
- LowPriorityCodec
- implicit def eitherRight[L, A, B, CF <: CodecFormat](implicit c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]
Create a codec which during decoding, first tries to decode values on the right using
c2
.Create a codec which during decoding, first tries to decode values on the right using
c2
. If this fails for any reason, decoding is done usingc1
. Both codecs must have the same low-level values and formats.For a left-biased variant see Codec.eitherLeft. This right-biased version is the default when using implicit codec resolution.
The schema is defined to be an either schema as created by Schema.schemaForEither.
- Definition Classes
- LowPriorityCodec
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val file: Codec[File, File, OctetStream]
- Definition Classes
- CodecExtensions
- implicit val float: Codec[String, Float, TextPlain]
- implicit macro def formCaseClassCodec[T <: Product with Serializable](implicit conf: Configuration): Codec[String, T, XWwwFormUrlencoded]
- Definition Classes
- FormCodecMacros
- def formMapCodec(charset: Charset): Codec[String, Map[String, String], XWwwFormUrlencoded]
- implicit val formMapCodecUtf8: Codec[String, Map[String, String], XWwwFormUrlencoded]
- def formSeqCodec(charset: Charset): Codec[String, Seq[(String, String)], XWwwFormUrlencoded]
- implicit val formSeqCodecUtf8: Codec[String, Seq[(String, String)], XWwwFormUrlencoded]
- def fromDecodeAndMeta[L, H, CF <: CodecFormat](cf: CF)(f: (L) => DecodeResult[H])(g: (H) => L)(implicit arg0: Schema[H]): Codec[L, H, CF]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def id[L, CF <: CodecFormat](f: CF, s: Schema[L]): Codec[L, L, CF]
- def idPlain[L](s: Schema[L] = Schema[L](SchemaType.SString())): Codec[L, L, TextPlain]
- implicit val inputStream: Codec[InputStream, InputStream, OctetStream]
- implicit val instant: Codec[String, Instant, TextPlain]
- implicit val int: Codec[String, Int, TextPlain]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val javaBigDecimal: Codec[String, BigDecimal, TextPlain]
- implicit val javaBigInteger: Codec[String, BigInteger, TextPlain]
- def json[T](_rawDecode: (String) => DecodeResult[T])(_encode: (T) => String)(implicit arg0: Schema[T]): JsonCodec[T]
- implicit def list[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], List[U], CF]
Create a codec which decodes/encodes a list of low-level values to a list of high-level values, using the given base codec
c
.Create a codec which decodes/encodes a list of low-level values to a list of high-level values, using the given base codec
c
.The schema is copied from the base codec.
- implicit def listHead[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], U, CF]
Create a codec which requires that a list of low-level values contains a single element.
Create a codec which requires that a list of low-level values contains a single element. Otherwise a decode failure is returned. The given base codec
c
is used for decoding/encoding.The schema and validator are copied from the base codec.
- implicit def listHeadOption[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Option[U], CF]
Create a codec which requires that a list of low-level values is empty or contains a single element.
Create a codec which requires that a list of low-level values is empty or contains a single element. If it contains multiple elements, a decode failure is returned. The given base codec
c
is used for decoding/encoding.The schema and validator are copied from the base codec.
- implicit val localDate: Codec[String, LocalDate, TextPlain]
- implicit val localDateTime: Codec[String, LocalDateTime, TextPlain]
- implicit val localTime: Codec[String, LocalTime, TextPlain]
- implicit val long: Codec[String, Long, TextPlain]
- def multipartCodec(partCodecs: Map[String, PartCodec[_, _]], defaultPartCodec: Option[PartCodec[_, _]]): MultipartCodec[Seq[AnyPart]]
- partCodecs
For each supported part, a (raw body type, codec) pair which encodes the part value into a raw value of the given type. A single part value might be encoded as multiple (or none) raw values.
- defaultPartCodec
Default codec to use for parts which are not defined in
partCodecs
.None
, if extra parts should be discarded.
- 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()
- implicit val offsetDateTime: Codec[String, OffsetDateTime, TextPlain]
- implicit val offsetTime: Codec[String, OffsetTime, TextPlain]
- implicit def option[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Option[T], Option[U], CF]
Create a codec which decodes/encodes an optional low-level value to an optional high-level value.
Create a codec which decodes/encodes an optional low-level value to an optional high-level value. The given base codec
c
is used for decoding/encoding.The schema and validator are copied from the base codec.
- implicit def optionHead[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Option[T], U, CF]
Create a codec which requires that an optional low-level value is defined.
Create a codec which requires that an optional low-level value is defined. If it is
None
, a decode failure is returned. The given base codecc
is used for decoding/encoding.The schema and validator are copied from the base codec.
- def rawPartCodec(partCodecs: Map[String, PartCodec[_, _]], defaultCodec: Option[PartCodec[_, _]]): Codec[Seq[RawPart], Seq[AnyPart], MultipartFormData]
- implicit val scalaDuration: Codec[String, Duration, TextPlain]
- implicit def set[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Set[U], CF]
Create a codec which decodes/encodes a list of low-level values to a set of high-level values, using the given base codec
c
.Create a codec which decodes/encodes a list of low-level values to a set of high-level values, using the given base codec
c
.The schema is copied from the base codec.
- implicit val short: Codec[String, Short, TextPlain]
- implicit val string: Codec[String, String, TextPlain]
- def stringCodec[T](parse: (String) => T)(implicit arg0: Schema[T]): Codec[String, T, TextPlain]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit def textOrCloseWebSocketFrameCodec[A, CF <: CodecFormat](implicit stringCodec: Codec[String, A, CF]): Codec[WebSocketFrame, Option[A], CF]
A codec which expects only text and close frames (all other frames cause a decoding error).
A codec which expects only text and close frames (all other frames cause a decoding error). Close frames correspond to
None
, while text frames are handled using the givenstringCodec
and wrapped withSome
. - implicit def textWebSocketFrameCodec[A, CF <: CodecFormat](implicit stringCodec: Codec[String, A, CF]): Codec[WebSocketFrame, A, CF]
A codec which expects only text frames (all other frames cause a decoding error) and handles the text using the given
stringCodec
. - def toString(): String
- Definition Classes
- AnyRef → Any
- implicit val uri: PlainCodec[Uri]
- implicit def usernamePasswordCodec: PlainCodec[UsernamePassword]
- implicit val uuid: Codec[String, UUID, TextPlain]
- implicit def vector[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Vector[U], CF]
Create a codec which decodes/encodes a list of low-level values to a vector of high-level values, using the given base codec
c
.Create a codec which decodes/encodes a list of low-level values to a vector of high-level values, using the given base codec
c
.The schema and validator are copied from the base codec.
- 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])
- implicit val webSocketFrameCodec: Codec[WebSocketFrame, WebSocketFrame, TextPlain]
- def xml[T](_rawDecode: (String) => DecodeResult[T])(_encode: (T) => String)(implicit arg0: Schema[T]): XmlCodec[T]
- implicit val zoneOffset: Codec[String, ZoneOffset, TextPlain]
- implicit val zonedDateTime: Codec[String, ZonedDateTime, TextPlain]
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated