Class/Object

io.circe

ACursor

Related Docs: object ACursor | package circe

Permalink

case class ACursor(either: Xor[HCursor, HCursor]) extends ACursorOperations with Product with Serializable

A cursor that tracks history and represents the possibility of failure.

See also

GenericCursor

Linear Supertypes
Serializable, Serializable, Product, Equals, ACursorOperations, GenericCursor[ACursor], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ACursor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ACursorOperations
  7. GenericCursor
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ACursor(either: Xor[HCursor, HCursor])

    Permalink

Type Members

  1. type Focus[x] = Option[x]

    Permalink

    The context that the cursor is available in.

    The context that the cursor is available in.

    Definition Classes
    ACursorOperations → GenericCursor
  2. type M[x[_]] = Applicative[x]

    Permalink

    The type class including the operations needed for withFocusM.

    The type class including the operations needed for withFocusM.

    Definition Classes
    ACursorOperations → GenericCursor
  3. type Result = ACursor

    Permalink

    The type returned by navigation and modifications operations.

    The type returned by navigation and modifications operations.

    Definition Classes
    ACursorOperations → GenericCursor

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def any: HCursor

    Permalink

    Return the underlying cursor.

  5. def as[A](implicit d: Decoder[A]): Xor[DecodingFailure, A]

    Permalink

    Attempt to decode the focus as an A.

    Attempt to decode the focus as an A.

    Definition Classes
    ACursorOperations → GenericCursor
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def cursor: Option[Cursor]

    Permalink

    Return the underlying cursor if successful.

  9. def delete: ACursor

    Permalink

    Delete the focus and move to its parent.

    Delete the focus and move to its parent.

    Definition Classes
    ACursorOperations → GenericCursor
  10. def deleteGoField(k: String): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  11. def deleteGoFirst: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  12. def deleteGoLast: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  13. def deleteGoLeft: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  14. def deleteGoRight: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  15. def deleteLefts: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  16. def deleteRights: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  17. def downArray: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  18. def downAt(p: (Json) ⇒ Boolean): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  19. def downField(k: String): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  20. def downN(n: Int): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  21. val either: Xor[HCursor, HCursor]

    Permalink
  22. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def failed: Boolean

    Permalink

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

  24. def failure: Option[HCursor]

    Permalink

    Return the failed HCursor if we are in a failure state.

  25. def failureFocus: Option[Json]

    Permalink

    Return the previous focus, if and only if we didn't succeed.

  26. def field(k: String): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  27. def fieldSet: Option[Set[String]]

    Permalink

    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
    ACursorOperations → GenericCursor
  28. def fields: Option[List[String]]

    Permalink

    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
    ACursorOperations → GenericCursor
  29. def finalize(): Unit

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

    Permalink

    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
    ACursorOperations → GenericCursor
  31. def first: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  32. def focus: Option[Json]

    Permalink

    The current location in the document.

    The current location in the document.

    Definition Classes
    ACursorOperations → GenericCursor
  33. def get[A](k: String)(implicit d: Decoder[A]): Xor[DecodingFailure, A]

    Permalink

    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
    ACursorOperations → GenericCursor
  34. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  35. def history: List[CursorOp]

    Permalink

    Return the underlying cursor's history.

  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def last: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  38. def left: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  39. def leftAt(p: (Json) ⇒ Boolean): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  40. def leftN(n: Int): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  41. def lefts: Option[List[Json]]

    Permalink

    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
    ACursorOperations → GenericCursor
  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def reattempt: ACursor

    Permalink

    If the last operation was not successful, reattempt it.

  46. def right: ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  47. def rightAt(p: (Json) ⇒ Boolean): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  48. def rightN(n: Int): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  49. def rights: Option[List[Json]]

    Permalink

    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
    ACursorOperations → GenericCursor
  50. def set(j: Json): ACursor

    Permalink

    Replace the focus.

    Replace the focus.

    Definition Classes
    GenericCursor
  51. def setLefts(x: List[Json]): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  52. def setRights(x: List[Json]): ACursor

    Permalink

    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
    ACursorOperations → GenericCursor
  53. def succeeded: Boolean

    Permalink

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

  54. def success: Option[HCursor]

    Permalink

    Return the current HCursor if we are in a success state.

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

    Permalink
    Definition Classes
    AnyRef
  56. def top: Option[Json]

    Permalink

    Return to the root of the document.

    Return to the root of the document.

    Definition Classes
    ACursorOperations → GenericCursor
  57. def up: ACursor

    Permalink

    Move the focus to the parent.

    Move the focus to the parent.

    Definition Classes
    ACursorOperations → GenericCursor
  58. def validation: Validated[HCursor, HCursor]

    Permalink

    Return a cats.data.Validated of the underlying cursor.

  59. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. def withFocus(f: (Json) ⇒ Json): ACursor

    Permalink

    Modify the focus using the given function.

    Modify the focus using the given function.

    Definition Classes
    ACursorOperations → GenericCursor
  63. def withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit F: Applicative[F]): F[ACursor]

    Permalink

    Modify the focus in a context using the given function.

    Modify the focus in a context using the given function.

    Definition Classes
    ACursorOperations → GenericCursor
  64. def |||(c: ⇒ ACursor): ACursor

    Permalink

    Return the current cursor or the given one if this one isn't successful.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ACursorOperations

Inherited from GenericCursor[ACursor]

Inherited from AnyRef

Inherited from Any

Type members

ACursor fields and operations

Access and navigation

Modification

Array access

Object access

Array navigation

Object navigation

Array modification

Object modification

Decoding