spray.json

lenses

package lenses

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. lenses
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait BasicRules extends AnyRef

  2. trait ExtraImplicits extends AnyRef

  3. case class GetOrThrow[B](e: Either[Throwable, B]) extends Product with Serializable

  4. type Id[T] = T

  5. trait Join[M1[_], M2[_], R[_]] extends AnyRef

    This typeclass with its implicit instances decides how two containers should be joined.

    This typeclass with its implicit instances decides how two containers should be joined.

    Supported containers are

    • Id for scalar values
    • Option for optional values
    • Seq for a vector of values

    Those container types form an ordering from most specific to most abstract:

    • Id contains always one value
    • Option contains always zero or one value
    • Seq can contain any number of values

    The rule to determine what the result type of joining two container types is that the result is as generic as the more generic of both of the input types.

    The implicit definitions in the companion object of join form evidence for this ordering.

  6. type JsPred = (JsValue) ⇒ Boolean

  7. trait JsonPathIntegration extends AnyRef

  8. trait Lens[M[_]] extends UpdateLens with ReadLens[M]

    A Lens combines read and update functions of UpdateLens and ReadLens into combinable chunks.

    A Lens combines read and update functions of UpdateLens and ReadLens into combinable chunks.

    A lens can either operate on a scalar value, or on an optional value, or on a sequence value. This is denoted by the M[_] type constructor.

  9. abstract class LensImpl[M[_]] extends Lens[M]

    This implements most of the methods of Lens.

    This implements most of the methods of Lens. Implementors of a new type of lens must implement retr for the read side of the lens and updated for the update side of the lens.

  10. type Operation = (SafeJsValue) ⇒ SafeJsValue

  11. trait Operations extends OptionalFieldOperations

    Defines a set of operations to update Json values.

  12. trait Ops[M[_]] extends AnyRef

    A trait to define common operations for different container types.

    A trait to define common operations for different container types. There's some bias towards Seq because container types have to support conversions towards and from Seq.

    This could probably made more general but the methods defined here comprise exactly the set of operations needed to allow combining different kinds of lenses.

  13. type OptLens = Lens[Option]

  14. trait OptionLenses extends AnyRef

  15. trait OptionalFieldOperations extends AnyRef

  16. trait ReadLens[M[_]] extends AnyRef

    The read lens can extract child values out of a JsValue hierarchy.

    The read lens can extract child values out of a JsValue hierarchy. A read lens is parameterized with a type constructor. This allows to extracts not only scalar values but also sequences or optional values.

    M

  17. trait Reader[T] extends AnyRef

  18. type SafeJsValue = Either[Exception, JsValue]

  19. type ScalarLens = Lens[Id]

  20. trait ScalarLenses extends AnyRef

  21. type SeqLens = Lens[Seq]

  22. trait SeqLenses extends AnyRef

  23. trait Update extends (JsValue) ⇒ JsValue

  24. trait UpdateLens extends AnyRef

    The UpdateLens is the central interface for updating a child element somewhere deep down a hierarchy of a JsValue.

  25. case class ValidateOption[T](option: Option[T]) extends Product with Serializable

  26. type Validated[T] = Either[Exception, T]

Value Members

  1. def ???: Nothing

  2. object ExtraImplicits extends ExtraImplicits

  3. object Join

  4. object JsonLenses extends ScalarLenses with OptionLenses with SeqLenses with Operations with JsonPathIntegration with ExtraImplicits

    An aggregate option to import all of the functionality of JsonLenses with one import.

  5. object JsonPath

    The AST for a json-path.

    The AST for a json-path. Basically follows the specification at http://goessner.net/articles/JsonPath/

  6. object JsonPathParser extends Parser with BasicRules

    A parser for json-path expression as specified here: http://goessner.net/articles/JsonPath/

  7. object Operations extends Operations with ExtraImplicits

  8. object Ops

  9. object OptionLenses extends OptionLenses

  10. object Reader

  11. object ScalarLenses extends ScalarLenses

  12. object SeqLenses extends SeqLenses

  13. implicit def orThrow[B](e: Either[Throwable, B]): GetOrThrow[B]

  14. def outOfBounds(message: String): Left[IndexOutOfBoundsException, Nothing]

  15. implicit def rightBiasEither[A, B](e: Either[A, B]): RightProjection[A, B]

  16. def safe[T](body: ⇒ T): Validated[T]

  17. def unexpected(message: String): Left[RuntimeException, Nothing]

  18. implicit def validateOption[T](o: Option[T]): ValidateOption[T]

Inherited from AnyRef

Inherited from Any

Ungrouped