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
.
- Companion:
- object
- Source:
- Cursor.scala
Value members
Concrete methods
Move the cursor to the given sibling field in a JSON object (alias for field
).
Move the cursor to the given sibling field in a JSON object (alias for field
).
- Source:
- Cursor.scala
Move the cursor down to a JSON object at the given field (alias for downField
).
Move the cursor down to a JSON object at the given field (alias for downField
).
- Source:
- Cursor.scala
Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for leftN
).
Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for leftN
).
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for downAt
).
Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for downAt
).
- Source:
- Cursor.scala
Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for rightN
).
Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for rightN
).
- Source:
- Cursor.scala
Move the cursor right in a JSON array until the given predicate matches the focus (alias for rightAt
).
Move the cursor right in a JSON array until the given predicate matches the focus (alias for rightAt
).
- Source:
- Cursor.scala
Set the focus to the given value (alias for set
).
Set the focus to the given value (alias for set
).
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the given index (alias for downN
).
Move the cursor down to a JSON array at the given index (alias for downN
).
- Source:
- Cursor.scala
Update the focus with the given function (alias for withFocus
).
Update the focus with the given function (alias for withFocus
).
- Source:
- Cursor.scala
Move the cursor left in a JSON array until the given predicate matches the focus (alias for leftAt
).
Move the cursor left in a JSON array until the given predicate matches the focus (alias for leftAt
).
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the first element (alias for downArray
).
Move the cursor down to a JSON array at the first element (alias for downArray
).
- Source:
- Cursor.scala
An ACursor for this cursor that tracks history.
An ACursor for this cursor that tracks history.
- Source:
- Cursor.scala
Return the current context of the focus.
Return the current context of the focus.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent
).
Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent
).
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves to the given sibling field in a JSON object.
Deletes the JSON value at focus and moves to the given sibling field in a JSON object.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves to the first in a JSON array.
Deletes the JSON value at focus and moves to the first in a JSON array.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves to the last in a JSON array.
Deletes the JSON value at focus and moves to the last in a JSON array.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves to the left in a JSON array.
Deletes the JSON value at focus and moves to the left in a JSON array.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves up to parent (alias for unary_!
).
Deletes the JSON value at focus and moves up to parent (alias for unary_!
).
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves to the right in a JSON array.
Deletes the JSON value at focus and moves to the right in a JSON array.
- Source:
- Cursor.scala
Deletes all JSON values to left of focus in a JSON array.
Deletes all JSON values to left of focus in a JSON array.
- Source:
- Cursor.scala
Deletes all JSON values to right of focus in a JSON array.
Deletes all JSON values to right of focus in a JSON array.
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the first element (alias for \\
).
Move the cursor down to a JSON array at the first element (alias for \\
).
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for -\
).
Move the cursor down to a JSON array at the first element satisfying the given predicate (alias for -\
).
- Source:
- Cursor.scala
Move the cursor down to a JSON object at the given field (alias for --\
).
Move the cursor down to a JSON object at the given field (alias for --\
).
- Source:
- Cursor.scala
Move the cursor down to a JSON array at the given index (alias for =\
).
Move the cursor down to a JSON array at the given index (alias for =\
).
- Source:
- Cursor.scala
Move the cursor to the given sibling field in a JSON object (alias for --
).
Move the cursor to the given sibling field in a JSON object (alias for --
).
- Source:
- Cursor.scala
Find the first element at or to the right of focus in a JSON array where the given predicate matches the focus.
Find the first element at or to the right of focus in a JSON array where the given predicate matches the focus.
- Source:
- Cursor.scala
Move the cursor to the first in a JSON array.
Move the cursor to the first in a JSON array.
- Source:
- Cursor.scala
A HCursor for this cursor that tracks history.
A HCursor for this cursor that tracks history.
- Source:
- Cursor.scala
Move the cursor to the last in a JSON array.
Move the cursor to the last in a JSON array.
- Source:
- Cursor.scala
Move the cursor left in a JSON array until the given predicate matches the focus (alias for ?<-:
).
Move the cursor left in a JSON array until the given predicate matches the focus (alias for ?<-:
).
- Source:
- Cursor.scala
Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for -<-:
).
Move the cursor left in a JSON array the given number of times. A negative value will move the cursor right (alias for -<-:
).
- Source:
- Cursor.scala
Return the values left of focus in a JSON array.
Return the values left of focus in a JSON array.
- Source:
- Cursor.scala
Move the cursor right in a JSON array until the given predicate matches the focus (alias for :->?
).
Move the cursor right in a JSON array until the given predicate matches the focus (alias for :->?
).
- Source:
- Cursor.scala
Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for :->-
).
Move the cursor right in a JSON array the given number of times. A negative value will move the cursor left (alias for :->-
).
- Source:
- Cursor.scala
Return the values right of focus in a JSON array.
Return the values right of focus in a JSON array.
- Source:
- Cursor.scala
Set the focus to the given value (alias for :=
).
Set the focus to the given value (alias for :=
).
- Source:
- Cursor.scala
Set the values to the left of focus in a JSON array.
Set the values to the left of focus in a JSON array.
- Source:
- Cursor.scala
Set the values to the right of focus in a JSON array.
Set the values to the right of focus in a JSON array.
- Source:
- Cursor.scala
Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent
).
Deletes the JSON value at focus and moves up to parent (alias for deleteGoParent
).
- Source:
- Cursor.scala
Unapplies the cursor to the top-level parent (alias for undo
).
Unapplies the cursor to the top-level parent (alias for undo
).
- Source:
- Cursor.scala
Unapplies the cursor to the top-level parent (alias for unary_-
).
Unapplies the cursor to the top-level parent (alias for unary_-
).
- Source:
- Cursor.scala
Move the cursor up one step to the parent context.
Move the cursor up one step to the parent context.
- Source:
- Cursor.scala
Update the focus with the given function (alias for >->
).
Update the focus with the given function (alias for >->
).
- Source:
- Cursor.scala