Package

org

json4s

Permalink

package json4s

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. json4s
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait BigDecimalJsonFormats extends DefaultJsonFormats with DefaultReaders with BigDecimalWriters

    Permalink
  2. trait BigDecimalWriters extends DefaultWriters

    Permalink
  3. class CustomKeySerializer[A] extends KeySerializer[A]

    Permalink
  4. class CustomSerializer[A] extends Serializer[A]

    Permalink
  5. trait DateFormat extends AnyRef

    Permalink

    Conversions between String and Date.

  6. trait DefaultFormats extends Formats

    Permalink
  7. trait DefaultJsonFormats extends AnyRef

    Permalink
  8. trait DefaultReaders extends DefaultReaders0

    Permalink
  9. trait DefaultWriters extends AnyRef

    Permalink
  10. trait DoubleJsonFormats extends DefaultJsonFormats with DefaultReaders with DoubleWriters

    Permalink
  11. trait DoubleWriters extends DefaultWriters

    Permalink
  12. class DynamicJValue extends Dynamic

    Permalink
  13. trait DynamicJValueImplicits extends AnyRef

    Permalink
  14. class ExtractableJsonAstNode extends AnyRef

    Permalink
  15. case class FieldSerializer[A](serializer: PartialFunction[(String, Any), Option[(String, Any)]] = Map(), deserializer: PartialFunction[JField, JField] = Map(), includeLazyVal: Boolean = false)(implicit mf: Manifest[A]) extends Product with Serializable

    Permalink

    Serializer which serializes all fields of a class too.

    Serializer which serializes all fields of a class too.

    Serialization can be intercepted by giving two optional PartialFunctions as constructor parameters:

    FieldSerializer[WildDog](
      renameTo("name", "animalname") orElse ignore("owner"),
      renameFrom("animalname", "name")
    )
    

    The third optional parameter "includeLazyVal" determines if serializer will serialize/deserialize lazy val fields or not.

  16. case class FileInput(file: File) extends JsonInput with Product with Serializable

    Permalink
  17. trait Formats extends Serializable

    Permalink

    Formats to use when converting JSON.

    Formats to use when converting JSON. Formats are usually configured by using an implicit parameter:

    implicit val formats = org.json4s.DefaultFormats
    

    Annotations
    @implicitNotFound( ... )
  18. case class FullTypeHints(hints: List[Class[_]], typeHintFieldName: String = "jsonClass") extends TypeHints with Product with Serializable

    Permalink

    Use full class name as a type hint.

  19. type JArray = json4s.JsonAST.JArray

    Permalink
  20. type JBool = json4s.JsonAST.JBool

    Permalink
  21. type JDecimal = json4s.JsonAST.JDecimal

    Permalink
  22. type JDouble = json4s.JsonAST.JDouble

    Permalink
  23. type JField = (String, json4s.JsonAST.JValue)

    Permalink
  24. type JInt = json4s.JsonAST.JInt

    Permalink
  25. type JLong = json4s.JsonAST.JLong

    Permalink
  26. type JObject = json4s.JsonAST.JObject

    Permalink
  27. type JSet = json4s.JsonAST.JSet

    Permalink
  28. type JString = json4s.JsonAST.JString

    Permalink
  29. type JValue = json4s.JsonAST.JValue

    Permalink
  30. trait JsonFormat[T] extends Writer[T] with Reader[T]

    Permalink
    Annotations
    @implicitNotFound( ... )
  31. sealed abstract class JsonInput extends Product with Serializable

    Permalink
  32. trait JsonMethods[T] extends AnyRef

    Permalink
  33. abstract class JsonUtil extends AnyRef

    Permalink
  34. trait JsonWriter[T] extends AnyRef

    Permalink
  35. trait KeySerializer[A] extends AnyRef

    Permalink
  36. case class MappedTypeHints(hintMap: Map[Class[_], String], typeHintFieldName: String = "jsonClass") extends TypeHints with Product with Serializable

    Permalink

    Use a map of keys as type hints.

    Use a map of keys as type hints. Values may not be mapped by multiple keys

  37. case class MappingException(msg: String, cause: Exception) extends Exception with Product with Serializable

    Permalink
  38. class MonadicJValue extends AnyRef

    Permalink
  39. trait ParameterNameReader extends json4s.reflect.ParameterNameReader

    Permalink
  40. trait Reader[T] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  41. case class ReaderInput(reader: java.io.Reader) extends JsonInput with Product with Serializable

    Permalink
  42. trait RichSerializer[A] extends AnyRef

    Permalink
  43. trait Serialization extends AnyRef

    Permalink
  44. trait Serializer[A] extends AnyRef

    Permalink
  45. case class ShortTypeHints(hints: List[Class[_]], typeHintFieldName: String = "jsonClass") extends TypeHints with Product with Serializable

    Permalink

    Use short class name as a type hint.

  46. case class StreamInput(stream: InputStream) extends JsonInput with Product with Serializable

    Permalink
  47. case class StringInput(string: String) extends JsonInput with Product with Serializable

    Permalink
  48. class ToJsonWritable[T] extends AnyRef

    Permalink
  49. trait TypeHints extends AnyRef

    Permalink

    Type hints can be used to alter the default conversion rules when converting Scala instances into JSON and vice versa.

    Type hints can be used to alter the default conversion rules when converting Scala instances into JSON and vice versa. Type hints must be used when converting class which is not supported by default (for instance when class is not a case class).

    Example:

    class DateTime(val time: Long)
    
    val hints = new ShortTypeHints(classOf[DateTime] :: Nil) {
      override def serialize: PartialFunction[Any, JObject] = {
        case t: DateTime => JObject(JField("t", JInt(t.time)) :: Nil)
      }
    
      override def deserialize: PartialFunction[(String, JObject), Any] = {
        case ("DateTime", JObject(JField("t", JInt(t)) :: Nil)) => new DateTime(t.longValue)
      }
    }
    implicit val formats = DefaultFormats.withHints(hints)
    

  50. type TypeInfo = json4s.reflect.TypeInfo

    Permalink
  51. trait Writer[-T] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )

Value Members

  1. object BigDecimalJsonFormats extends BigDecimalJsonFormats

    Permalink
  2. object BigDecimalWriters extends BigDecimalWriters

    Permalink
  3. object DefaultFormats extends DefaultFormats

    Permalink

    Default date format is UTC time.

  4. object DefaultJsonFormats extends DoubleJsonFormats

    Permalink
  5. object DefaultReaders extends DefaultReaders

    Permalink
  6. object DefaultWriters extends DoubleWriters

    Permalink
  7. object DoubleJsonFormats extends DoubleJsonFormats

    Permalink
  8. object DoubleWriters extends DoubleWriters

    Permalink
  9. object DynamicJValue extends DynamicJValueImplicits

    Permalink
  10. object Extraction

    Permalink

    Function to extract values from JSON AST using case classes.

    Function to extract values from JSON AST using case classes.

    See: ExtractionExamples.scala

  11. object FieldSerializer extends Serializable

    Permalink
  12. object Formats extends Serializable

    Permalink
  13. val JArray: json4s.JsonAST.JArray.type

    Permalink
  14. val JBool: json4s.JsonAST.JBool.type

    Permalink
  15. val JDecimal: json4s.JsonAST.JDecimal.type

    Permalink
  16. val JDouble: json4s.JsonAST.JDouble.type

    Permalink
  17. val JField: json4s.JsonAST.JField.type

    Permalink
  18. val JInt: json4s.JsonAST.JInt.type

    Permalink
  19. val JLong: json4s.JsonAST.JLong.type

    Permalink
  20. val JNothing: json4s.JsonAST.JNothing.type

    Permalink
  21. val JNull: json4s.JsonAST.JNull.type

    Permalink
  22. val JObject: json4s.JsonAST.JObject.type

    Permalink
  23. val JSet: json4s.JsonAST.JSet.type

    Permalink
  24. val JString: json4s.JsonAST.JString.type

    Permalink
  25. object JsonWriter

    Permalink
  26. object NoTypeHints extends TypeHints with Product with Serializable

    Permalink

    Do not use any type hints.

  27. object ParserUtil

    Permalink
  28. val TypeInfo: json4s.reflect.TypeInfo.type

    Permalink
  29. implicit def file2JsonInput(file: File): JsonInput

    Permalink
  30. implicit def jsonwritable[T](a: T)(implicit arg0: Writer[T]): ToJsonWritable[T]

    Permalink
  31. implicit def jvalue2extractable(jv: JValue): ExtractableJsonAstNode

    Permalink
  32. implicit def jvalue2monadic(jv: JValue): MonadicJValue

    Permalink
  33. package prefs

    Permalink
  34. implicit def reader2JsonInput(rdr: java.io.Reader): JsonInput

    Permalink
  35. package reflect

    Permalink
  36. implicit def stream2JsonInput(stream: InputStream): JsonInput

    Permalink
  37. implicit def string2JsonInput(s: String): JsonInput

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped