Extract a value from a JSON.
Extract a value from a JSON.
Value can be:
Example:
case class Person(name: String) JObject(JField("name", JString("joe")) :: Nil).extract[Person] == Person("joe")
Extract a value from a JSON.
Extract a value from a JSON.
Value can be:
Example:
case class Person(name: String) JObject(JField("name", JString("joe")) :: Nil).extractOpt[Person] == Some(Person("joe"))
Extract a value from a JSON using a default value.
Extract a value from a JSON using a default value.
Value can be:
Example:
case class Person(name: String) JNothing.extractOrElse(Person("joe")) == Person("joe")