codecs

smithy4s.http.json.codecs
See thecodecs companion object
final case class codecs(hintMask: HintMask, maxArity: Int, explicitNullEncoding: Boolean) extends JsonCodecAPI

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class JsonCodecAPI
trait CodecAPI
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Cache = CompilationCache[JCodec]

Attributes

Inherited from:
JsonCodecAPI
type Codec[A] = JCodec[A]

Attributes

Inherited from:
JsonCodecAPI

Value members

Inherited methods

def compileCodec[A](schema0: Schema[A], cache: Cache): JCodec[A]

Turns a Schema into this API's preferred representation.

Turns a Schema into this API's preferred representation.

Value parameters

cache

a Cache that can be used to optimise the compilation of Schemas into Codecs.

schema

the value's schema

Attributes

Returns

the codec associated to the A value.

Inherited from:
JsonCodecAPI
final def compileCodec[A](schema: Schema[A]): Codec[A]

Turns a Schema into this API's preferred representation.

Turns a Schema into this API's preferred representation.

Value parameters

schema

the value's schema

Attributes

Returns

the codec associated to the A value.

Inherited from:
CodecAPI
final def compileCodecK(cache: Cache): PolyFunction[Schema, Codec]

Attributes

Inherited from:
CodecAPI

Attributes

Inherited from:
JsonCodecAPI
def decodeFromByteArray[A](codec: JCodec[A], bytes: Array[Byte]): Either[PayloadError, A]

Attributes

Inherited from:
CodecAPI
override def decodeFromByteArrayPartial[A](codec: JCodec[A], bytes: Array[Byte]): Either[PayloadError, BodyPartial[A]]

Decodes partial data from a byte array

Decodes partial data from a byte array

Value parameters

bytes

an byte array

codec

the implementation-specific codec type

Attributes

Returns

either a PayloadError, or the partial data, which can be combined with partial data coming from the metadata.

Definition Classes
JsonCodecAPI -> CodecAPI
Inherited from:
JsonCodecAPI
def decodeFromByteBuffer[A](codec: JCodec[A], bytes: ByteBuffer): Either[PayloadError, A]

Attributes

Inherited from:
CodecAPI
override def decodeFromByteBufferPartial[A](codec: JCodec[A], bytes: ByteBuffer): Either[PayloadError, BodyPartial[A]]

Decodes partial data from a byte buffer, returning a function that is able to reconstruct the full data, provided a map resulting from the decoding of the metadata.

Decodes partial data from a byte buffer, returning a function that is able to reconstruct the full data, provided a map resulting from the decoding of the metadata.

Value parameters

bytes

a bytue buffer

codec

the implementation-specific codec

Attributes

Returns

either a PayloadError, or the partial data, which can be combined with partial data coming from the metadata.

Definition Classes
JsonCodecAPI -> CodecAPI
Inherited from:
JsonCodecAPI
def mediaType[A](codec: JCodec[A]): Type

Attributes

Inherited from:
JsonCodecAPI

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
override def writeToArray[A](codec: JCodec[A], value: A): Array[Byte]

Writes data to a byte array. Field values bound to http metadata (path/query/headers) must be eluded.

Writes data to a byte array. Field values bound to http metadata (path/query/headers) must be eluded.

Value parameters

codec

the implementation-specific codec

value

the value to encode

Attributes

Definition Classes
JsonCodecAPI -> CodecAPI
Inherited from:
JsonCodecAPI