PrimitiveJCodec

trait PrimitiveJCodec[A] extends JCodec[A]
trait JCodec[A]
trait JsonCodec[A]
trait JsonKeyCodec[A]
trait JsonValueCodec[A]
trait Serializable
class Object
trait Matchable
class Any

Value members

Abstract methods

def decodeValue(in: JsonReader): A

Concrete methods

final override
def decodeValue(cursor: Cursor, in: JsonReader): A
Definition Classes

Inherited methods

def biject[B](to: A => B, from: B => A): JCodec[B]
Inherited from
JCodec
def canBeKey: Boolean
Inherited from
JCodec
def decodeKey(in: JsonReader): A

Attempts to decode a value of type A from the specified JsonReader, but may fail with JsonReaderException error if the JSON input is not a key or does not encode a value of this type.

Attempts to decode a value of type A from the specified JsonReader, but may fail with JsonReaderException error if the JSON input is not a key or does not encode a value of this type.

Value Params
in

an instance of JsonReader which provide an access to the JSON input to parse a JSON key to value of type A

Inherited from
JsonKeyCodec
def decodeMessage(in: JsonReader): Map[String, Any] => A
Inherited from
JCodec
final override
def decodeValue(in: JsonReader, default: A): A
Definition Classes
JCodec -> JsonValueCodec
Inherited from
JCodec
def encodeKey(x: A, out: JsonWriter): Unit

Encodes the specified value using provided JsonWriter as a JSON key, but may fail with JsonWriterException if it cannot be encoded properly according to RFC-8259 requirements.

Encodes the specified value using provided JsonWriter as a JSON key, but may fail with JsonWriterException if it cannot be encoded properly according to RFC-8259 requirements.

Value Params
out

an instance of JsonWriter which provides access to JSON output to serialize the specified value as a JSON key

x

the value provided for serialization

Inherited from
JsonKeyCodec
def encodeValue(x: A, out: JsonWriter): Unit

Encodes the specified value using provided JsonWriter, but may fail with JsonWriterException if it cannot be encoded properly according to RFC-8259 requirements.

Encodes the specified value using provided JsonWriter, but may fail with JsonWriterException if it cannot be encoded properly according to RFC-8259 requirements.

Value Params
out

an instance of JsonWriter which provides access to JSON output to serialize the specified value as a JSON value

x

the value provided for serialization

Inherited from
JsonValueCodec
def expectBody: Boolean

States whether this codec expects data from the body of an http request (as opposed to from headers, query params, etc). Used to prevent parsing altogether when not required.

States whether this codec expects data from the body of an http request (as opposed to from headers, query params, etc). Used to prevent parsing altogether when not required.

Inherited from
JCodec
def expecting: String
Inherited from
JCodec
final override
def nullValue: A
Definition Classes
JCodec -> JsonValueCodec
Inherited from
JCodec
def widen[B >: A]: JCodec[B]
Inherited from
JCodec

Inherited fields

Inherited from
JCodec