Packages

abstract class ACursor extends Serializable

A zipper that represents a position in a JSON document and supports navigation and modification.

The focus represents the current position of the cursor; it may be updated with withFocus or changed using navigation methods like left and right.

Linear Supertypes
Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ACursor
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ACursor(lastCursor: HCursor, lastOp: CursorOp)

Abstract Value Members

  1. abstract def delete: ACursor

    Delete the focus and move to its parent.

  2. abstract def deleteGoField(k: String): ACursor

    Delete the focus and move to the sibling with the given key in a JSON object.

  3. abstract def deleteGoFirst: ACursor

    Delete the focus and move to the first element in a JSON array.

  4. abstract def deleteGoLast: ACursor

    Delete the focus and move to the last element in a JSON array.

  5. abstract def deleteGoLeft: ACursor

    Delete the focus and move to the left in a JSON array.

  6. abstract def deleteGoRight: ACursor

    Delete the focus and move to the right in a JSON array.

  7. abstract def deleteLefts: ACursor

    Delete all values to the left of the focus in a JSON array.

  8. abstract def deleteRights: ACursor

    Delete all values to the right of the focus in a JSON array.

  9. abstract def downArray: ACursor

    If the focus is a JSON array, move to its first element.

  10. abstract def downAt(p: (Json) ⇒ Boolean): ACursor

    If the focus is a JSON array, move to the first element that satisfies the given predicate.

  11. abstract def downField(k: String): ACursor

    If the focus is a JSON object, move to the value of the given key.

  12. abstract def downN(n: Int): ACursor

    If the focus is a JSON array, move to the element at the given index.

  13. abstract def field(k: String): ACursor

    If the focus is a value in a JSON object, move to a sibling with the given key.

  14. abstract def find(p: (Json) ⇒ Boolean): ACursor

    If the focus is an element in a JSON array, find the first element at or to its right that matches the given predicate.

  15. abstract def first: ACursor

    If the focus is an element in a JSON array, move to the first element.

  16. abstract def focus: Option[Json]

    The current location in the document.

  17. abstract def keys: Option[Iterable[String]]

    If the focus is a JSON object, return its field names in their original order.

  18. abstract def last: ACursor

    If the focus is an element in a JSON array, move to the last element.

  19. abstract def left: ACursor

    If the focus is an element in a JSON array, move to the left.

  20. abstract def leftAt(p: (Json) ⇒ Boolean): ACursor

    If the focus is an element in a JSON array, move to the left until the given predicate matches the new focus.

  21. abstract def leftN(n: Int): ACursor

    If the focus is an element in JSON array, move to the left the given number of times.

    If the focus is an element in JSON array, move to the left the given number of times.

    A negative value will move the cursor right.

  22. abstract def lefts: Option[Vector[Json]]

    If the focus is a JSON array, return the elements to the left.

  23. abstract def right: ACursor

    If the focus is an element in a JSON array, move to the right.

  24. abstract def rightAt(p: (Json) ⇒ Boolean): ACursor

    If the focus is an element in a JSON array, move to the right until the given predicate matches the new focus.

  25. abstract def rightN(n: Int): ACursor

    If the focus is an element in JSON array, move to the right the given number of times.

    If the focus is an element in JSON array, move to the right the given number of times.

    A negative value will move the cursor left.

  26. abstract def rights: Option[Vector[Json]]

    If the focus is a JSON array, return the elements to the right.

  27. abstract def setLefts(x: Vector[Json]): ACursor

    Replace all values to the left of the focus in a JSON array.

  28. abstract def setRights(x: Vector[Json]): ACursor

    Replace all values to the right of the focus in a JSON array.

  29. abstract def succeeded: Boolean

    Indicate whether this cursor represents the result of a successful operation.

  30. abstract def success: Option[HCursor]

    Return the cursor as an HCursor if it was successful.

  31. abstract def top: Option[Json]

    Return to the root of the document.

  32. abstract def up: ACursor

    Move the focus to the parent.

  33. abstract def values: Option[Iterable[Json]]

    If the focus is a JSON array, return its elements.

  34. abstract def withFocus(f: (Json) ⇒ Json): ACursor

    Modify the focus using the given function.

  35. abstract def withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit F: Applicative[F]): F[ACursor]

    Modify the focus in a context using the given function.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def as[A](implicit d: Decoder[A]): Result[A]

    Attempt to decode the focus as an A.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def failed: Boolean

    Indicate whether this cursor represents the result of an unsuccessful operation.

  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def get[A](k: String)(implicit d: Decoder[A]): Result[A]

    Attempt to decode the value at the given key in a JSON object as an A.

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def getOrElse[A](k: String)(fallback: ⇒ A)(implicit d: Decoder[A]): Result[A]

    Attempt to decode the value at the given key in a JSON object as an A.

    Attempt to decode the value at the given key in a JSON object as an A. If the field k is missing, then use the fallback instead.

  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def history: List[CursorOp]

    The operations that have been performed so far.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def replay(history: List[CursorOp]): ACursor

    Replay history (a list of operations in reverse "chronological" order) against this cursor.

  21. final def replayOne(op: CursorOp): ACursor

    Replay an operation against this cursor.

  22. final def set(j: Json): ACursor

    Replace the focus.

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Miscellaneous utilities

Access and navigation

Modification

Array access

Object access

Array navigation

Object navigation

Array modification

Object modification

Decoding

Ungrouped