org.http4s.circe

Type members

Classlikes

Derive EntityDecoder if implicit io.circe.Decoder is in the scope without need to explicitly call jsonOf.

Derive EntityDecoder if implicit io.circe.Decoder is in the scope without need to explicitly call jsonOf.

Companion:
object
Source:
CirceEntityDecoder.scala

Derive EntityEncoder if implicit io.circe.Encoder is in the scope without need to explicitly call jsonEncoderOf.

Derive EntityEncoder if implicit io.circe.Encoder is in the scope without need to explicitly call jsonEncoderOf.

Companion:
object
Source:
CirceEntityEncoder.scala
sealed abstract case class CirceInstancesBuilder

Derive EntityDecoder if implicit io.circe.Decoder is in the scope without need to explicitly call jsonOfSensitive

Derive EntityDecoder if implicit io.circe.Decoder is in the scope without need to explicitly call jsonOfSensitive

Note that it varies from CirceEntityDecoder in that, when failing to decode io.circe.Json to an A, the JSON will not be included in the raised java.lang.Exception. In the event the JSON includes sensitive data, this trait is, arguably, a better choice since it eliminates the risk of logging sensitive data, e.g. due to logging a raised java.lang.Throwable that includes the sensitive JSON.

Companion:
object
Source:
CirceSensitiveDataEntityDecoder.scala
final case class DecodingFailures(failures: NonEmptyList[DecodingFailure]) extends Exception

Wraps a list of decoding failures as an java.lang.Exception when using accumulatingJsonOf to decode JSON messages.

Wraps a list of decoding failures as an java.lang.Exception when using accumulatingJsonOf to decode JSON messages.

Source:
DecodingFailures.scala
trait JsonDecoder[F[_]]

F-algebra for separating the Sync required for extracting the Json from the body. As such if F is Sync at some layer, then this can be used to extract without the lower layer needing to be aware of the strong constraint.

F-algebra for separating the Sync required for extracting the Json from the body. As such if F is Sync at some layer, then this can be used to extract without the lower layer needing to be aware of the strong constraint.

Companion:
object
Source:
JsonDecoder.scala
Companion:
class
Source:
JsonDecoder.scala

Value members

Inherited methods

def accumulatingJsonOf[F[_], A](implicit F: Concurrent[F], decoder: Decoder[A]): EntityDecoder[F, A]

An EntityDecoder that uses circe's accumulating decoder for decoding the JSON.

An EntityDecoder that uses circe's accumulating decoder for decoding the JSON.

In case of a failure, returns an InvalidMessageBodyFailure with the cause containing a DecodingFailures exception, from which the errors can be extracted.

Inherited from:
CirceInstances
Source:
CirceInstances.scala
def jsonEncoderWithPrinterOf[A](printer: Printer)(implicit encoder: Encoder[A]): Pure[A]
def jsonOf[F[_] : Concurrent, A : Decoder]: EntityDecoder[F, A]
def jsonOfSensitive[F[_] : Concurrent, A : Decoder](redact: Json => String): EntityDecoder[F, A]
def jsonOfWithMedia[F[_], A](r1: MediaRange, rs: MediaRange*)(implicit F: Concurrent[F], decoder: Decoder[A]): EntityDecoder[F, A]
def jsonOfWithSensitiveMedia[F[_], A](redact: Json => String, r1: MediaRange, rs: MediaRange*)(implicit F: Concurrent[F], decoder: Decoder[A]): EntityDecoder[F, A]

An EntityEncoder for a fs2.Stream of JSONs, which will encode it as a single JSON array.

An EntityEncoder for a fs2.Stream of JSONs, which will encode it as a single JSON array.

Inherited from:
CirceInstances
Source:
CirceInstances.scala
def streamJsonArrayEncoderWithPrinterOf[F[_], A](printer: Printer)(implicit encoder: Encoder[A]): EntityEncoder[F, Stream[F, A]]

An EntityEncoder for a fs2.Stream of values, which will encode it as a single JSON array.

An EntityEncoder for a fs2.Stream of values, which will encode it as a single JSON array.

Inherited from:
CirceInstances
Source:
CirceInstances.scala

Implicits

Inherited implicits

implicit val decodeUri: Decoder[Uri]
implicit val encodeUri: Encoder[Uri]
implicit def jsonDecoder[F[_] : Concurrent]: EntityDecoder[F, Json]
implicit def jsonEncoder: Pure[Json]
implicit def streamJsonArrayEncoder[F[_]]: EntityEncoder[F, Stream[F, Json]]
final implicit def toMessageSyntax[F[_]](req: Message[F]): MessageSyntax[F]