p

org

json4s

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
  2. trait BigDecimalWriters extends DefaultWriters
  3. class CustomKeySerializer [A] extends KeySerializer[A]
  4. class CustomSerializer [A] extends Serializer[A]
  5. trait DateFormat extends AnyRef

    Conversions between String and Date.

  6. trait DefaultFormats extends Formats
  7. trait DefaultJsonFormats extends AnyRef
  8. trait DefaultReaders extends AnyRef
  9. trait DefaultWriters extends AnyRef
  10. trait DoubleJsonFormats extends DefaultJsonFormats with DefaultReaders with DoubleWriters
  11. trait DoubleWriters extends DefaultWriters
  12. class DynamicJValue extends Dynamic
  13. trait DynamicJValueImplicits extends AnyRef
  14. class ExtractableJsonAstNode extends AnyRef
  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

    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
  17. trait Formats extends Serializable

    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[_]]) extends TypeHints with Product with Serializable

    Use full class name as a type hint.

  19. type JArray = json4s.JsonAST.JArray
  20. type JBool = json4s.JsonAST.JBool
  21. type JDecimal = json4s.JsonAST.JDecimal
  22. type JDouble = json4s.JsonAST.JDouble
  23. type JField = (String, json4s.JsonAST.JValue)
  24. type JInt = json4s.JsonAST.JInt
  25. type JLong = json4s.JsonAST.JLong
  26. type JObject = json4s.JsonAST.JObject
  27. type JSet = json4s.JsonAST.JSet
  28. type JString = json4s.JsonAST.JString
  29. type JValue = json4s.JsonAST.JValue
  30. trait JsonFormat [T] extends Writer[T] with Reader[T]
    Annotations
    @implicitNotFound( ... )
  31. sealed abstract class JsonInput extends Product with Serializable
  32. trait JsonMethods [T] extends AnyRef
  33. abstract class JsonUtil extends AnyRef
  34. trait JsonWriter [T] extends AnyRef
  35. trait KeySerializer [A] extends AnyRef
  36. case class MappingException (msg: String, cause: Exception) extends Exception with Product with Serializable
  37. class MonadicJValue extends AnyRef
  38. trait ParameterNameReader extends json4s.reflect.ParameterNameReader
  39. trait Reader [T] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  40. case class ReaderInput (reader: java.io.Reader) extends JsonInput with Product with Serializable
  41. trait Serialization extends AnyRef
  42. trait Serializer [A] extends AnyRef
  43. case class ShortTypeHints (hints: List[Class[_]]) extends TypeHints with Product with Serializable

    Use short class name as a type hint.

  44. case class StreamInput (stream: InputStream) extends JsonInput with Product with Serializable
  45. case class StringInput (string: String) extends JsonInput with Product with Serializable
  46. class ToJsonWritable [T] extends AnyRef
  47. trait TypeHints extends AnyRef

    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)
    

  48. type TypeInfo = json4s.reflect.TypeInfo
  49. trait Writer [-T] extends AnyRef
    Annotations
    @implicitNotFound( ... )

Value Members

  1. val JArray: json4s.JsonAST.JArray.type
  2. val JBool: json4s.JsonAST.JBool.type
  3. val JDecimal: json4s.JsonAST.JDecimal.type
  4. val JDouble: json4s.JsonAST.JDouble.type
  5. val JField: json4s.JsonAST.JField.type
  6. val JInt: json4s.JsonAST.JInt.type
  7. val JLong: json4s.JsonAST.JLong.type
  8. val JNothing: json4s.JsonAST.JNothing.type
  9. val JNull: json4s.JsonAST.JNull.type
  10. val JObject: json4s.JsonAST.JObject.type
  11. val JSet: json4s.JsonAST.JSet.type
  12. val JString: json4s.JsonAST.JString.type
  13. val TypeInfo: json4s.reflect.TypeInfo.type
  14. implicit def file2JsonInput(file: File): JsonInput
  15. implicit def jsonwritable[T](a: T)(implicit arg0: Writer[T]): ToJsonWritable[T]
  16. implicit def jvalue2extractable(jv: JValue): ExtractableJsonAstNode
  17. implicit def jvalue2monadic(jv: JValue): MonadicJValue
  18. implicit def reader2JsonInput(rdr: java.io.Reader): JsonInput
  19. implicit def stream2JsonInput(stream: InputStream): JsonInput
  20. implicit def string2JsonInput(s: String): JsonInput
  21. object BigDecimalJsonFormats extends BigDecimalJsonFormats
  22. object BigDecimalWriters extends BigDecimalWriters
  23. object DefaultFormats extends DefaultFormats

    Default date format is UTC time.

  24. object DefaultJsonFormats extends DoubleJsonFormats
  25. object DefaultReaders extends DefaultReaders
  26. object DefaultWriters extends DoubleWriters
  27. object DoubleJsonFormats extends DoubleJsonFormats
  28. object DoubleWriters extends DoubleWriters
  29. object DynamicJValue extends DynamicJValueImplicits
  30. object Extraction

    Function to extract values from JSON AST using case classes.

    Function to extract values from JSON AST using case classes.

    See: ExtractionExamples.scala

  31. object FieldSerializer extends Serializable
  32. object Formats extends Serializable
  33. object JsonWriter
  34. object NoTypeHints extends TypeHints with Product with Serializable

    Do not use any type hints.

  35. object ParserUtil
  36. object Xml

    Functions to convert between JSON and XML.

Inherited from AnyRef

Inherited from Any

Ungrouped