io.circe

ACursor

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, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ACursor
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
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 fieldSet: Option[Set[String]]

    If the focus is a JSON object, return its field names in a set.

  15. abstract def fields: Option[Vector[String]]

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

  16. 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.

  17. abstract def first: ACursor

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

  18. abstract def focus: Option[Json]

    The current location in the document.

  19. abstract def last: ACursor

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

  20. abstract def left: ACursor

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

  21. 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.

  22. 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.

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

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

  24. abstract def right: ACursor

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

  25. 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.

  26. 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.

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

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

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

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

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

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

  30. abstract def succeeded: Boolean

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

  31. abstract def success: Option[HCursor]

    Return the cursor as an HCursor if it was successful.

  32. abstract def top: Option[Json]

    Return to the root of the document.

  33. abstract def up: ACursor

    Move the focus to the parent.

  34. abstract def values: Option[Vector[Json]]

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

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

    Modify the focus using the given function.

  36. 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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def as[A](implicit d: Decoder[A]): Result[A]

    Attempt to decode the focus as an A.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  11. final def failed: Boolean

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

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. 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.

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

    Definition Classes
    AnyRef → Any
  15. 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.

  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def history: List[CursorOp]

    The operations that have been performed so far.

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  22. final def replay(history: List[CursorOp]): ACursor

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

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

    Replay an operation against this cursor.

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

    Replace the focus.

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

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

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