argonaut

Cursor

sealed trait Cursor extends AnyRef

Represents a position in a JSON value and allows moving around the JSON value. Also known as a "zipper." The cursor has a focus representing the current position being referred to by the cursor. Users may update the focus using withFocus (or the >-> alias) and move the cursor around with left, right, field, downArray, downField and up.

See also

Shift

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

Value Members

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

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

    Definition Classes
    AnyRef → Any
  3. def --(q: Json.JsonField): Option[Cursor]

    Move the cursor to the given sibling field in a JSON object (alias for field).

  4. def --\(q: Json.JsonField): Option[Cursor]

    Move the cursor down to a JSON object at the given field (alias for downField).

  5. def -<-:(n: Int): Option[Cursor]

    Move the cursor left in a JSON array the given number of times.

    Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for leftN).

  6. def -\(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for downAt).

  7. def :->-(n: Int): Option[Cursor]

    Move the cursor right in a JSON array the given number of times.

    Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for rightN).

  8. def :->?(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor right in a JSON array until the given predicate matches the focus (alias for rightAt).

  9. def :=(j: Json): Cursor

    Set the focus to the given value (alias for set).

  10. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def =\(n: Int): Option[Cursor]

    Move the cursor down to a JSON array at the given index (alias for downN).

  12. def >-->[F[+_]](k: (Json) ⇒ F[Json])(implicit arg0: Functor[F]): F[Cursor]

    Update the focus with the given function in a functor (alias for withFocusM).

  13. def >->(k: (Json) ⇒ Json): Cursor

    Update the focus with the given function (alias for withFocus).

  14. def ?<-:(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor left in a JSON array until the given predicate matches the focus (alias for leftAt).

  15. def \\: Option[Cursor]

    Move the cursor down to a JSON array at the first element (alias for downArray).

  16. def acursor: ACursor

    An ACursor for this cursor that tracks history.

  17. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def context: Context

    Return the current context of the focus.

  20. def delete: Option[Cursor]

    Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent).

  21. def deleteGoField(q: Json.JsonField): Option[Cursor]

    Deletes the JSON value at focus and moves to the given sibling field in a JSON object.

  22. def deleteGoFirst: Option[Cursor]

    Deletes the JSON value at focus and moves to the first in a JSON array.

  23. def deleteGoLast: Option[Cursor]

    Deletes the JSON value at focus and moves to the last in a JSON array.

  24. def deleteGoLeft: Option[Cursor]

    Deletes the JSON value at focus and moves to the left in a JSON array.

  25. def deleteGoParent: Option[Cursor]

    Deletes the JSON value at focus and moves up to parent (alias for unary_!).

  26. def deleteGoRight: Option[Cursor]

    Deletes the JSON value at focus and moves to the right in a JSON array.

  27. def deleteLefts: Option[Cursor]

    Deletes all JSON values to left of focus in a JSON array.

  28. def deleteRights: Option[Cursor]

    Deletes all JSON values to right of focus in a JSON array.

  29. def downArray: Option[Cursor]

    Move the cursor down to a JSON array at the first element (alias for \\).

  30. def downAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for -\).

  31. def downField(q: Json.JsonField): Option[Cursor]

    Move the cursor down to a JSON object at the given field (alias for --\).

  32. def downN(n: Int): Option[Cursor]

    Move the cursor down to a JSON array at the given index (alias for =\).

  33. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  35. def field(q: Json.JsonField): Option[Cursor]

    Move the cursor to the given sibling field in a JSON object (alias for --).

  36. def fieldSet: Option[Set[Json.JsonField]]

    All field names in a JSON object.

  37. def fields: Option[List[Json.JsonField]]

    All field names in a JSON object.

  38. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. def find(p: (Json) ⇒ Boolean): Option[Cursor]

    Find the first element at or to the right of focus in a JSON array where the given predicate matches the focus.

  40. def first: Option[Cursor]

    Move the cursor to the first in a JSON array.

  41. def focus: Json

    Return the current focus.

  42. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  43. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  44. def hcursor: HCursor

    A HCursor for this cursor that tracks history.

  45. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  46. def last: Option[Cursor]

    Move the cursor to the last in a JSON array.

  47. def left: Option[Cursor]

    Move the cursor left in a JSON array.

  48. def leftAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor left in a JSON array until the given predicate matches the focus (alias for ?<-:).

  49. def leftN(n: Int): Option[Cursor]

    Move the cursor left in a JSON array the given number of times.

    Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for -<-:).

  50. def lefts: Option[Json.JsonArray]

    Return the values left of focus in a JSON array.

  51. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  52. final def notify(): Unit

    Definition Classes
    AnyRef
  53. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  54. def right: Option[Cursor]

    Move the cursor right in a JSON array.

  55. def rightAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Move the cursor right in a JSON array until the given predicate matches the focus (alias for :->?).

  56. def rightN(n: Int): Option[Cursor]

    Move the cursor right in a JSON array the given number of times.

    Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for :->-).

  57. def rights: Option[Json.JsonArray]

    Return the values right of focus in a JSON array.

  58. def set(j: Json): Cursor

    Set the focus to the given value (alias for :=).

  59. def setLefts(x: List[Json]): Option[Cursor]

    Set the values to the left of focus in a JSON array.

  60. def setRights(x: List[Json]): Option[Cursor]

    Set the values to the right of focus in a JSON array.

  61. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  62. def toString(): String

    Definition Classes
    AnyRef → Any
  63. def traverse[X](r: Kleisli[[+α]IndexedStateT[[+X]X, X, X, α], Cursor, Cursor]): Endo[X]

  64. def traverseBreak[X](r: Kleisli[[+α]IndexedStateT[[+X]X, X, X, α], Cursor, Option[Cursor]]): Endo[X]

  65. def unary_!: Option[Cursor]

    Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent).

  66. def unary_-: Json

    Unapplies the cursor to the top-level parent (alias for undo).

  67. def undo: Json

    Unapplies the cursor to the top-level parent (alias for unary_-).

  68. def up: Option[Cursor]

    Move the cursor up one step to the parent context.

  69. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  72. def withFocus(k: (Json) ⇒ Json): Cursor

    Update the focus with the given function (alias for >->).

  73. def withFocusM[F[+_]](k: (Json) ⇒ F[Json])(implicit arg0: Functor[F]): F[Cursor]

    Update the focus with the given function in a functor (alias for >-->).

Inherited from AnyRef

Inherited from Any

Ungrouped