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 AsJsonInput[A] extends AnyRef

    Permalink
  2. trait BigDecimalJsonFormats extends DefaultJsonFormats with DefaultReaders with BigDecimalWriters

    Permalink
  3. trait BigDecimalWriters extends DefaultWriters

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

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

    Permalink
  6. trait DateFormat extends AnyRef

    Permalink

    Conversions between String and Date.

  7. trait DefaultFormats extends Formats

    Permalink
  8. trait DefaultJsonFormats extends AnyRef

    Permalink
  9. trait DefaultReaders extends DefaultReaders0

    Permalink
  10. trait DefaultWriters extends AnyRef

    Permalink
  11. trait DoubleJsonFormats extends DefaultJsonFormats with DefaultReaders with DoubleWriters

    Permalink
  12. trait DoubleWriters extends DefaultWriters

    Permalink
  13. class DynamicJValue extends Dynamic

    Permalink
  14. trait DynamicJValueImplicits extends AnyRef

    Permalink
  15. final class ExtractableJsonAstNode extends AnyVal

    Permalink
  16. case class FieldSerializer[A](serializer: PartialFunction[(String, Any), Option[(String, Any)]] = Map(), deserializer: PartialFunction[JField, JField] = Map(), includeLazyVal: Boolean = false)(implicit mf: ClassTag[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.

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

    Permalink
  18. 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: Formats = org.json4s.DefaultFormats
    

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

    Permalink

    Use full class name as a type hint.

  20. type JField = (String, json4s.JsonAST.JValue)

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

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

    Permalink
  23. trait JsonMethods[T] extends AnyRef

    Permalink
  24. abstract class JsonUtil extends AnyRef

    Permalink
  25. trait JsonWriter[T] extends AnyRef

    Permalink
  26. trait KeySerializer[A] extends AnyRef

    Permalink
  27. 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

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

    Permalink
  29. final class MonadicJValue extends AnyVal

    Permalink
  30. type ParameterNameReader = json4s.reflect.ParameterNameReader

    Permalink
  31. trait Reader[T] extends AnyRef

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

    Permalink
  33. final class ReaderSyntax extends AnyVal

    Permalink
  34. trait RichSerializer[A] extends AnyRef

    Permalink
  35. trait Serialization extends AnyRef

    Permalink
  36. trait Serializer[A] extends AnyRef

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

    Permalink

    Use short class name as a type hint.

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

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

    Permalink
  40. final class ToJsonWritable[T] extends AnyVal

    Permalink
  41. 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: Formats = DefaultFormats.withHints(hints)
    

  42. type TypeInfo = json4s.reflect.TypeInfo

    Permalink
  43. trait Writer[-T] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )

Value Members

  1. object AsJsonInput

    Permalink
  2. object BigDecimalJsonFormats extends BigDecimalJsonFormats

    Permalink
  3. object BigDecimalWriters extends BigDecimalWriters

    Permalink
  4. object DefaultFormats extends DefaultFormats

    Permalink

    Default date format is UTC time.

  5. object DefaultJsonFormats extends DoubleJsonFormats

    Permalink
  6. object DefaultReaders extends DefaultReaders

    Permalink
  7. object DefaultWriters extends DoubleWriters

    Permalink
  8. object DoubleJsonFormats extends DoubleJsonFormats

    Permalink
  9. object DoubleWriters extends DoubleWriters

    Permalink
  10. object DynamicJValue extends DynamicJValueImplicits

    Permalink
  11. 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

  12. object FieldSerializer extends Serializable

    Permalink
  13. object Formats extends Serializable

    Permalink
  14. object JsonWriter

    Permalink
  15. object MonadicJValue

    Permalink
  16. object NoTypeHints extends TypeHints with Product with Serializable

    Permalink

    Do not use any type hints.

  17. object ParserUtil

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

    Permalink
  19. implicit def convertToJsonInput[A](input: A)(implicit arg0: AsJsonInput[A]): JsonInput

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

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

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

    Permalink
  23. implicit def jvalue2readerSyntax(j: JValue): ReaderSyntax

    Permalink
  24. package prefs

    Permalink
  25. package reflect

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped