p

org

json4s

package json4s

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())(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")
    )
    

  16. case class FileInput (file: File) extends JsonInput with Product with Serializable
  17. trait Formats extends AnyRef

    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 JObject = json4s.JsonAST.JObject
  26. type JString = json4s.JsonAST.JString
  27. type JValue = json4s.JsonAST.JValue
  28. trait JsonFormat [T] extends Writer[T] with Reader[T]
    Annotations
    @implicitNotFound( ... )
  29. sealed trait JsonInput extends AnyRef
  30. trait JsonMethods [T] extends AnyRef
  31. abstract class JsonUtil extends AnyRef
  32. trait JsonWriter [T] extends AnyRef
  33. trait KeySerializer [A] extends AnyRef
  34. case class MappingException (msg: String, cause: Exception) extends Exception with Product with Serializable
  35. class MonadicJValue extends AnyRef
  36. trait ParameterNameReader extends json4s.reflect.ParameterNameReader
  37. trait Reader [T] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  38. case class ReaderInput (reader: java.io.Reader) extends JsonInput with Product with Serializable
  39. trait Serialization extends AnyRef
  40. trait Serializer [A] extends AnyRef
  41. case class ShortTypeHints (hints: List[Class[_]]) extends TypeHints with Product with Serializable

    Use short class name as a type hint.

  42. case class StreamInput (stream: InputStream) extends JsonInput with Product with Serializable
  43. case class StringInput (string: String) extends JsonInput with Product with Serializable
  44. class ToJsonWritable [T] extends AnyRef
  45. 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)
    

  46. type TypeInfo = json4s.reflect.TypeInfo
  47. 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 JNothing: json4s.JsonAST.JNothing.type
  8. val JNull: json4s.JsonAST.JNull.type
  9. val JObject: json4s.JsonAST.JObject.type
  10. val JString: json4s.JsonAST.JString.type
  11. val TypeInfo: json4s.reflect.TypeInfo.type
  12. implicit def file2JsonInput(file: File): JsonInput
  13. implicit def jsonwritable[T](a: T)(implicit arg0: Writer[T]): ToJsonWritable[T]
  14. implicit def jvalue2extractable(jv: JValue): ExtractableJsonAstNode
  15. implicit def jvalue2monadic(jv: JValue): MonadicJValue
  16. implicit def reader2JsonInput(rdr: java.io.Reader): JsonInput
  17. implicit def stream2JsonInput(stream: InputStream): JsonInput
  18. implicit def string2JsonInput(s: String): JsonInput
  19. object BigDecimalJsonFormats extends BigDecimalJsonFormats
  20. object BigDecimalWriters extends BigDecimalWriters
  21. object DefaultFormats extends DefaultFormats

    Default date format is UTC time.

  22. object DefaultJsonFormats extends DoubleJsonFormats
  23. object DefaultReaders extends DefaultReaders
  24. object DefaultWriters extends DoubleWriters
  25. object DoubleJsonFormats extends DoubleJsonFormats
  26. object DoubleWriters extends DoubleWriters
  27. object DynamicJValue extends DynamicJValueImplicits
  28. 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

  29. object FieldSerializer extends Serializable
  30. object Formats
  31. object JsonWriter
  32. object NoTypeHints extends TypeHints with Product with Serializable

    Do not use any type hints.

  33. object ParserUtil
  34. object Xml

    Functions to convert between JSON and XML.

Inherited from AnyRef

Inherited from Any

Ungrouped