sealed abstract class ACursor extends GenericCursor[ACursor]
A cursor that tracks history and represents the possibility of failure.
- See also
- Alphabetic
- By Inheritance
- ACursor
- GenericCursor
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
Focus[x] = Option[x]
The context that the cursor is available in.
The context that the cursor is available in.
- Definition Classes
- ACursor → GenericCursor
-
type
M[x[_]] = Applicative[x]
The type class including the operations needed for
withFocusM
.The type class including the operations needed for
withFocusM
.- Definition Classes
- ACursor → GenericCursor
-
type
Result = ACursor
The type returned by navigation and modifications operations.
The type returned by navigation and modifications operations.
- Definition Classes
- ACursor → GenericCursor
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val any: HCursor
-
final
def
as[A](implicit d: Decoder[A]): Decoder.Result[A]
Attempt to decode the focus as an
A
.Attempt to decode the focus as an
A
.- Definition Classes
- ACursor → GenericCursor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
cursor: Option[Cursor]
Return the underlying cursor if successful.
-
final
def
delete: ACursor
Delete the focus and move to its parent.
Delete the focus and move to its parent.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteGoField(k: String): ACursor
Delete the focus and move to the sibling with the given key in a JSON object.
Delete the focus and move to the sibling with the given key in a JSON object.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteGoFirst: ACursor
Delete the focus and move to the first element in a JSON array.
Delete the focus and move to the first element in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteGoLast: ACursor
Delete the focus and move to the last element in a JSON array.
Delete the focus and move to the last element in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteGoLeft: ACursor
Delete the focus and move to the left in a JSON array.
Delete the focus and move to the left in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteGoRight: ACursor
Delete the focus and move to the right in a JSON array.
Delete the focus and move to the right in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteLefts: ACursor
Delete all values to the left of the focus in a JSON array.
Delete all values to the left of the focus in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
deleteRights: ACursor
Delete all values to the right of the focus in a JSON array.
Delete all values to the right of the focus in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
downArray: ACursor
If the focus is a JSON array, move to its first element.
If the focus is a JSON array, move to its first element.
- Definition Classes
- ACursor → GenericCursor
-
final
def
downAt(p: (Json) ⇒ Boolean): ACursor
If the focus is a JSON array, move to the first element that satisfies the given predicate.
If the focus is a JSON array, move to the first element that satisfies the given predicate.
- Definition Classes
- ACursor → GenericCursor
-
final
def
downField(k: String): ACursor
If the focus is a JSON object, move to the value of the given key.
If the focus is a JSON object, move to the value of the given key.
- Definition Classes
- ACursor → GenericCursor
-
final
def
downN(n: Int): ACursor
If the focus is a JSON array, move to the element at the given index.
If the focus is a JSON array, move to the element at the given index.
- Definition Classes
- ACursor → GenericCursor
- final def either: Either[HCursor, HCursor]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
failed: Boolean
Indicate whether this cursor represents the result of an unsuccessful operation.
-
final
def
failure: Option[HCursor]
Return the failed HCursor if we are in a failure state.
-
final
def
failureFocus: Option[Json]
Return the previous focus, if and only if we didn't succeed.
-
final
def
field(k: String): ACursor
If the focus is a value in a JSON object, move to a sibling with the given key.
If the focus is a value in a JSON object, move to a sibling with the given key.
- Definition Classes
- ACursor → GenericCursor
-
final
def
fieldSet: Option[Set[String]]
If the focus is a JSON object, return its field names in a set.
If the focus is a JSON object, return its field names in a set.
- Definition Classes
- ACursor → GenericCursor
-
final
def
fields: Option[List[String]]
If the focus is a JSON object, return its field names in their original order.
If the focus is a JSON object, return its field names in their original order.
- Definition Classes
- ACursor → GenericCursor
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
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.
If the focus is an element in a JSON array, find the first element at or to its right that matches the given predicate.
- Definition Classes
- ACursor → GenericCursor
-
final
def
first: ACursor
If the focus is an element in a JSON array, move to the first element.
If the focus is an element in a JSON array, move to the first element.
- Definition Classes
- ACursor → GenericCursor
-
final
def
focus: Option[Json]
The current location in the document.
The current location in the document.
- Definition Classes
- ACursor → GenericCursor
-
final
def
get[A](k: String)(implicit d: Decoder[A]): Decoder.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
.- Definition Classes
- ACursor → GenericCursor
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getOrElse[A](k: String)(fallback: ⇒ A)(implicit d: Decoder[A]): Decoder.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 fieldk
is missing, then use thefallback
instead.- Definition Classes
- GenericCursor
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
history: List[HistoryOp]
Return the underlying cursor's history.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
last: ACursor
If the focus is an element in a JSON array, move to the last element.
If the focus is an element in a JSON array, move to the last element.
- Definition Classes
- ACursor → GenericCursor
-
final
def
left: ACursor
If the focus is an element in a JSON array, move to the left.
If the focus is an element in a JSON array, move to the left.
- Definition Classes
- ACursor → GenericCursor
-
final
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.
If the focus is an element in a JSON array, move to the left until the given predicate matches the new focus.
- Definition Classes
- ACursor → GenericCursor
-
final
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.
- Definition Classes
- ACursor → GenericCursor
-
final
def
lefts: Option[List[Json]]
If the focus is a JSON array, return the elements to the left.
If the focus is a JSON array, return the elements to the left.
- Definition Classes
- ACursor → GenericCursor
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
or(c: ⇒ ACursor): ACursor
Return the current cursor or the given one if this one isn't successful.
-
final
def
reattempt: ACursor
If the last operation was not successful, reattempt it.
-
final
def
replay(history: List[HistoryOp]): ACursor
Replay history (a list of operations in reverse "chronological" order) against this cursor.
Replay history (a list of operations in reverse "chronological" order) against this cursor.
- Definition Classes
- ACursor → GenericCursor
-
final
def
right: ACursor
If the focus is an element in a JSON array, move to the right.
If the focus is an element in a JSON array, move to the right.
- Definition Classes
- ACursor → GenericCursor
-
final
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.
If the focus is an element in a JSON array, move to the right until the given predicate matches the new focus.
- Definition Classes
- ACursor → GenericCursor
-
final
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.
- Definition Classes
- ACursor → GenericCursor
-
final
def
rights: Option[List[Json]]
If the focus is a JSON array, return the elements to the right.
If the focus is a JSON array, return the elements to the right.
- Definition Classes
- ACursor → GenericCursor
-
final
def
set(j: Json): ACursor
Replace the focus.
Replace the focus.
- Definition Classes
- GenericCursor
-
final
def
setLefts(x: List[Json]): ACursor
Replace all values to the left of the focus in a JSON array.
Replace all values to the left of the focus in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
setRights(x: List[Json]): ACursor
Replace all values to the right of the focus in a JSON array.
Replace all values to the right of the focus in a JSON array.
- Definition Classes
- ACursor → GenericCursor
-
final
def
success: Option[HCursor]
Return the current HCursor if we are in a success state.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
top: Option[Json]
Return to the root of the document.
Return to the root of the document.
- Definition Classes
- ACursor → GenericCursor
-
final
def
up: ACursor
Move the focus to the parent.
Move the focus to the parent.
- Definition Classes
- ACursor → GenericCursor
-
final
def
validation: Validated[HCursor, HCursor]
Return a cats.data.Validated of the underlying cursor.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
withFocus(f: (Json) ⇒ Json): ACursor
Modify the focus using the given function.
Modify the focus using the given function.
- Definition Classes
- ACursor → GenericCursor
-
final
def
withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit F: Applicative[F]): F[ACursor]
Modify the focus in a context using the given function.
Modify the focus in a context using the given function.
- Definition Classes
- ACursor → GenericCursor