Packages

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)

Abstract Value Members

  1. abstract def delete: ACursor

    Delete the focus and move to its parent.

  2. abstract def downArray: ACursor

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

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

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

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

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

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

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

  6. abstract def focus: Option[Json]

    The current location in the document.

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

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

  8. abstract def left: ACursor

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

  9. abstract def right: ACursor

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

  10. abstract def succeeded: Boolean

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

  11. abstract def success: Option[HCursor]

    Return the cursor as an HCursor if it was successful.

  12. abstract def top: Option[Json]

    Return to the root of the document.

  13. abstract def up: ACursor

    Move the focus to the parent.

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

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

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

    Modify the focus using the given function.

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

    Modify the focus in a context using the given function.

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

    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use up and downArray

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

    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use left

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

    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use right

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def as[A](implicit d: Decoder[A]): Result[A]

    Attempt to decode the focus as an A.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def failed: Boolean

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

  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. 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.

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. 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.

  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  15. final def history: List[CursorOp]

    The operations that have been performed so far.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def replay(history: List[CursorOp]): ACursor

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

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

    Replay an operation against this cursor.

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

    Replace the focus.

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Miscellaneous utilities

Access and navigation

Modification

Object access

Array navigation

Object navigation

Decoding

Ungrouped