io.circe.refined

Members list

Concise view

Type members

Classlikes

Provides codecs for refined types.

Provides codecs for refined types.

A refined type T Refined Predicate is encoded as T. Decoding ensures that the decoded value satisfies Predicate.

E.g. with generic codecs

case class Obj(
  i: Int Refined Positive
)

Obj(refineMV(4)).asJson.noSpaces == """{"i":4}"""

Attributes

Source:
CirceCodecRefined.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Implicits

Inherited implicits

final implicit def refinedDecoder[T, P, F[_, _]](implicit underlying: Decoder[T], validate: Validate[T, P], refType: RefType[F]): Decoder[F[T, P]]

Attributes

Inherited from:
CirceCodecRefined
Source:
CirceCodecRefined.scala
final implicit def refinedEncoder[T, P, F[_, _]](implicit underlying: Encoder[T], refType: RefType[F]): Encoder[F[T, P]]

Attributes

Inherited from:
CirceCodecRefined
Source:
CirceCodecRefined.scala
final implicit def refinedKeyDecoder[T, P, F[_, _]](implicit underlying: KeyDecoder[T], validate: Validate[T, P], refType: RefType[F]): KeyDecoder[F[T, P]]

Attributes

Inherited from:
CirceCodecRefined
Source:
CirceCodecRefined.scala
final implicit def refinedKeyEncoder[T, P, F[_, _]](implicit underlying: KeyEncoder[T], refType: RefType[F]): KeyEncoder[F[T, P]]

Attributes

Inherited from:
CirceCodecRefined
Source:
CirceCodecRefined.scala