Class/Object

io.circe

ACursor

Related Docs: object ACursor | package circe

Permalink

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, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ACursor
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ACursor(lastCursor: HCursor, lastOp: CursorOp)

    Permalink

Abstract Value Members

  1. abstract def delete: ACursor

    Permalink

    Delete the focus and move to its parent.

  2. abstract def deleteGoField(k: String): ACursor

    Permalink

    Delete the focus and move to the sibling with the given key in a JSON object.

  3. abstract def deleteGoFirst: ACursor

    Permalink

    Delete the focus and move to the first element in a JSON array.

  4. abstract def deleteGoLast: ACursor

    Permalink

    Delete the focus and move to the last element in a JSON array.

  5. abstract def deleteGoLeft: ACursor

    Permalink

    Delete the focus and move to the left in a JSON array.

  6. abstract def deleteGoRight: ACursor

    Permalink

    Delete the focus and move to the right in a JSON array.

  7. abstract def deleteLefts: ACursor

    Permalink

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

  8. abstract def deleteRights: ACursor

    Permalink

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

  9. abstract def downArray: ACursor

    Permalink

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

  10. abstract def downAt(p: (Json) ⇒ Boolean): ACursor

    Permalink

    If the focus is a JSON array, move to the first element that satisfies the given predicate.

  11. abstract def downField(k: String): ACursor

    Permalink

    If the focus is a JSON object, move to the value of the given key.

  12. abstract def downN(n: Int): ACursor

    Permalink

    If the focus is a JSON array, move to the element at the given index.

  13. abstract def field(k: String): ACursor

    Permalink

    If the focus is a value in a JSON object, move to a sibling with the given key.

  14. abstract 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.

  15. abstract def first: ACursor

    Permalink

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

  16. abstract def focus: Option[Json]

    Permalink

    The current location in the document.

  17. abstract def keys: Option[Iterable[String]]

    Permalink

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

  18. abstract def last: ACursor

    Permalink

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

  19. abstract def left: ACursor

    Permalink

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

  20. abstract 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.

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

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

    Permalink

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

  23. abstract def right: ACursor

    Permalink

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

  24. abstract 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.

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  29. abstract def succeeded: Boolean

    Permalink

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

  30. abstract def success: Option[HCursor]

    Permalink

    Return the cursor as an HCursor if it was successful.

  31. abstract def top: Option[Json]

    Permalink

    Return to the root of the document.

  32. abstract def up: ACursor

    Permalink

    Move the focus to the parent.

  33. abstract def values: Option[Iterable[Json]]

    Permalink

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

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

    Permalink

    Modify the focus using the given function.

  35. abstract def withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit F: Applicative[F]): F[ACursor]

    Permalink

    Modify the focus in a context using the given function.

Concrete 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. final def as[A](implicit d: Decoder[A]): Result[A]

    Permalink

    Attempt to decode the focus as an A.

  5. final def asInstanceOf[T0]: T0

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. final def failed: Boolean

    Permalink

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

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def get[A](k: String)(implicit d: Decoder[A]): Result[A]

    Permalink

    Attempt to decode the value at the given key in a JSON object as an A.

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def getOrElse[A](k: String)(fallback: ⇒ A)(implicit d: Decoder[A]): Result[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. If the field k is missing, then use the fallback instead.

  14. def hashCode(): Int

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

    Permalink

    The operations that have been performed so far.

  16. final def isInstanceOf[T0]: Boolean

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

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

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

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

    Permalink

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

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

    Permalink

    Replay an operation against this cursor.

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

    Permalink

    Replace the focus.

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

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) Use keys.map(_.toSet)

  2. final def fields: Option[Vector[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.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) Use keys

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