Class

org.json4s

ExtractableJsonAstNode

Related Doc: package json4s

Permalink

final class ExtractableJsonAstNode extends AnyVal

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

Instance Constructors

  1. new ExtractableJsonAstNode(jv: JValue)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def extract[A](implicit formats: Formats, mf: Manifest[A]): A

    Permalink

    Extract a value from a JSON.

    Extract a value from a JSON.

    Value can be:

    • case class
    • primitive (String, Boolean, Date, etc.)
    • supported collection type (List, Seq, Map[String, _], Set)
    • any type which has a configured custom deserializer

    Example:

    case class Person(name: String)
    JObject(JField("name", JString("joe")) :: Nil).extract[Person] == Person("joe")
    

  6. def extractOpt[A](implicit formats: Formats, mf: Manifest[A]): Option[A]

    Permalink

    Extract a value from a JSON.

    Extract a value from a JSON.

    Value can be:

    • case class
    • primitive (String, Boolean, Date, etc.)
    • supported collection type (List, Seq, Map[String, _], Set)
    • any type which has a configured custom deserializer

    Example:

    case class Person(name: String)
    JObject(JField("name", JString("joe")) :: Nil).extractOpt[Person] == Some(Person("joe"))
    

  7. def extractOrElse[A](default: ⇒ A)(implicit formats: Formats, mf: Manifest[A]): A

    Permalink

    Extract a value from a JSON using a default value.

    Extract a value from a JSON using a default value.

    Value can be:

    • case class
    • primitive (String, Boolean, Date, etc.)
    • supported collection type (List, Seq, Map[String, _], Set)
    • any type which has a configured custom deserializer

    Example:

    case class Person(name: String)
    JNothing.extractOrElse(Person("joe")) == Person("joe")
    

  8. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  10. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped