AdditionalFormats

Provides additional JsonFormats and helpers

class Object
trait Matchable
class Any

Type members

Value members

Concrete methods

def jsonFormat[T](reader: JsonReader[T], writer: JsonWriter[T]): JsonFormat[T]

Constructs a JsonFormat from its two parts, JsonReader and JsonWriter.

Constructs a JsonFormat from its two parts, JsonReader and JsonWriter.

def lazyFormat[T](format: => JsonFormat[T]): JsonFormat[T]

Lazy wrapper around serialization. Useful when you want to serialize (mutually) recursive structures.

Lazy wrapper around serialization. Useful when you want to serialize (mutually) recursive structures.

def lift[T](writer: JsonWriter[T]): JsonFormat[T]

Turns a JsonWriter into a JsonFormat that throws an UnsupportedOperationException for reads.

Turns a JsonWriter into a JsonFormat that throws an UnsupportedOperationException for reads.

def lift[T](writer: RootJsonWriter[T]): RootJsonFormat[T]

Turns a RootJsonWriter into a RootJsonFormat that throws an UnsupportedOperationException for reads.

Turns a RootJsonWriter into a RootJsonFormat that throws an UnsupportedOperationException for reads.

def lift[T <: AnyRef](reader: JsonReader[T]): JsonFormat[T]

Turns a JsonReader into a JsonFormat that throws an UnsupportedOperationException for writes.

Turns a JsonReader into a JsonFormat that throws an UnsupportedOperationException for writes.

def lift[T <: AnyRef](reader: RootJsonReader[T]): RootJsonFormat[T]

Turns a RootJsonReader into a RootJsonFormat that throws an UnsupportedOperationException for writes.

Turns a RootJsonReader into a RootJsonFormat that throws an UnsupportedOperationException for writes.

def rootFormat[T](format: JsonFormat[T]): RootJsonFormat[T]

Explicitly turns a JsonFormat into a RootJsonFormat.

Explicitly turns a JsonFormat into a RootJsonFormat.

def rootJsonFormat[T](reader: RootJsonReader[T], writer: RootJsonWriter[T]): RootJsonFormat[T]

Constructs a RootJsonFormat from its two parts, RootJsonReader and RootJsonWriter.

Constructs a RootJsonFormat from its two parts, RootJsonReader and RootJsonWriter.

def safeReader[A : JsonReader]: JsonReader[Either[Exception, A]]

Wraps an existing JsonReader with Exception protection.

Wraps an existing JsonReader with Exception protection.