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.

Source
ACursor.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. ACursor
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  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 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: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from ACursor to any2stringadd[ACursor] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ACursor, B)
    Implicit
    This member is added by an implicit conversion from ACursor to ArrowAssoc[ACursor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → 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. def ensuring(cond: (ACursor) ⇒ Boolean, msg: ⇒ Any): ACursor
    Implicit
    This member is added by an implicit conversion from ACursor to Ensuring[ACursor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (ACursor) ⇒ Boolean): ACursor
    Implicit
    This member is added by an implicit conversion from ACursor to Ensuring[ACursor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): ACursor
    Implicit
    This member is added by an implicit conversion from ACursor to Ensuring[ACursor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): ACursor
    Implicit
    This member is added by an implicit conversion from ACursor to Ensuring[ACursor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. final def failed: Boolean

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

  16. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from ACursor to StringFormat[ACursor] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. 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.

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. 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.

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

    The operations that have been performed so far.

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  27. final def replay(history: List[CursorOp]): ACursor

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

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

    Replay an operation against this cursor.

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

    Replace the focus.

  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def [B](y: B): (ACursor, B)
    Implicit
    This member is added by an implicit conversion from ACursor to ArrowAssoc[ACursor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ACursor to any2stringadd[ACursor]

Inherited by implicit conversion StringFormat from ACursor to StringFormat[ACursor]

Inherited by implicit conversion Ensuring from ACursor to Ensuring[ACursor]

Inherited by implicit conversion ArrowAssoc from ACursor to ArrowAssoc[ACursor]

Miscellaneous utilities

Access and navigation

Modification

Array access

Object access

Array navigation

Object navigation

Array modification

Object modification

Decoding

Ungrouped