JacksonSerialization

class JacksonSerialization(jsonMethods: JsonMethods) extends Serialization

Functions to serialize and deserialize a case class. Custom serializer can be inserted if a class is not a case class.

Functions to serialize and deserialize a case class. Custom serializer can be inserted if a class is not a case class.

Example:

val hints = new ShortTypeHints( ... )
implicit val formats: Formats = Serialization.formats(hints)
See also

org.json4s.TypeHints

trait Serialization
class Object
trait Matchable
class Any

Value members

Concrete methods

def read[A](json: JsonInput)(formats: Formats, mf: Manifest[A]): A

Deserialize from an JsonInput

Deserialize from an JsonInput

def read[A](in: Reader)(formats: Formats, mf: Manifest[A]): A

Deserialize from a Reader.

Deserialize from a Reader.

def write[A <: AnyRef](a: A)(formats: Formats): String

Serialize to String.

Serialize to String.

def write[A <: AnyRef, W <: Writer](a: A, out: W)(formats: Formats): W

Serialize to Writer.

Serialize to Writer.

def write[A <: AnyRef](a: A, out: OutputStream)(formats: Formats): Unit
def writePretty[A <: AnyRef](a: A)(formats: Formats): String

Serialize to String (pretty format).

Serialize to String (pretty format).

def writePretty[A <: AnyRef, W <: Writer](a: A, out: W)(formats: Formats): W

Serialize to Writer (pretty format).

Serialize to Writer (pretty format).

Inherited methods

def formats(hints: TypeHints): Formats

Create Serialization formats with given type hints.

Create Serialization formats with given type hints.

Example:

val hints = new ShortTypeHints( ... )
implicit val formats: Formats = Serialization.formats(hints)
Inherited from
Serialization
def read[A](json: String)(formats: Formats, mf: Manifest[A]): A

Deserialize from a String.

Deserialize from a String.

Inherited from
Serialization