BaseCirceSupport

com.github.pjfanning.pekkohttpcirce.BaseCirceSupport

Automatic to and from JSON marshalling/unmarshalling using an in-scope circe protocol.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Types

type SourceOf[A] = Source[A, _]

Value members

Concrete methods

def byteStringJsonUnmarshaller: Unmarshaller[ByteString, Json]
def mediaTypes: Seq[WithFixedCharset]
def unmarshallerContentTypes: Seq[ContentTypeRange]

Implicits

Implicits

implicit def fromByteStringUnmarshaller[A : Decoder]: Unmarshaller[ByteString, A]

ByteString => A

ByteString => A

Type parameters

A

type to decode

Attributes

Returns

unmarshaller for any A value

final implicit def jsonMarshaller(implicit printer: Printer): ToEntityMarshaller[Json]

Json => HTTP entity

Json => HTTP entity

Attributes

Returns

marshaller for JSON value

final implicit val jsonUnmarshaller: FromEntityUnmarshaller[Json]

HTTP entity => Json

HTTP entity => Json

Attributes

Returns

unmarshaller for Json

final implicit def marshaller[A : Encoder](implicit evidence$1: Encoder[A], printer: Printer): ToEntityMarshaller[A]

A => HTTP entity

A => HTTP entity

Type parameters

A

type to encode

Attributes

Returns

marshaller for any A value

final implicit val safeJsonUnmarshaller: FromEntityUnmarshaller[Either[ParsingFailure, Json]]

HTTP entity => Either[io.circe.ParsingFailure, Json]

HTTP entity => Either[io.circe.ParsingFailure, Json]

Attributes

Returns

unmarshaller for Either[io.circe.ParsingFailure, Json]

implicit def sourceMarshaller[A](implicit writes: Encoder[A], printer: Printer, support: JsonEntityStreamingSupport): ToEntityMarshaller[SourceOf[A]]

SourceOf[A] => HTTP entity

SourceOf[A] => HTTP entity

Type parameters

A

type to encode

Attributes

Returns

marshaller for any SourceOf[A] value

implicit def sourceUnmarshaller[A : Decoder](implicit evidence$1: Decoder[A], support: JsonEntityStreamingSupport): FromEntityUnmarshaller[SourceOf[A]]

HTTP entity => Source[A, _]

HTTP entity => Source[A, _]

Type parameters

A

type to decode

Attributes

Returns

unmarshaller for Source[A, _]

implicit def unmarshaller[A : Decoder]: FromEntityUnmarshaller[A]

HTTP entity => A

HTTP entity => A

Type parameters

A

type to decode

Attributes

Returns

unmarshaller for A