io.circe

HCursor

case class HCursor(cursor: Cursor, history: List[CursorOp]) extends HCursorOperations with Product with Serializable

A cursor that tracks the history of operations performed with it.

See also

GenericCursor

Linear Supertypes
Serializable, Serializable, Product, Equals, HCursorOperations, GenericCursor[HCursor], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HCursor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. HCursorOperations
  7. GenericCursor
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HCursor(cursor: Cursor, history: List[CursorOp])

Type Members

  1. type Focus[x] = x

    The context that the cursor is available in.

    The context that the cursor is available in.

    Definition Classes
    HCursorOperations → GenericCursor
  2. type M[x[_]] = Functor[x]

    The type class including the operations needed for withFocusM.

    The type class including the operations needed for withFocusM.

    Definition Classes
    HCursorOperations → GenericCursor
  3. type Result = ACursor

    The type returned by navigation and modifications operations.

    The type returned by navigation and modifications operations.

    Definition Classes
    HCursorOperations → GenericCursor

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. def acursor: ACursor

    Create an ACursor for this cursor.

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

    Attempt to decode the focus as an A.

    Attempt to decode the focus as an A.

    Definition Classes
    HCursorOperations → GenericCursor
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val cursor: Cursor

  11. def delete: ACursor

    Delete the focus and move to its parent.

    Delete the focus and move to its parent.

    Definition Classes
    HCursorOperations → GenericCursor
  12. def deleteGoField(k: String): ACursor

    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
    HCursorOperations → GenericCursor
  13. def deleteGoFirst: ACursor

    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
    HCursorOperations → GenericCursor
  14. def deleteGoLast: ACursor

    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
    HCursorOperations → GenericCursor
  15. def deleteGoLeft: ACursor

    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
    HCursorOperations → GenericCursor
  16. def deleteGoRight: ACursor

    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
    HCursorOperations → GenericCursor
  17. def deleteLefts: ACursor

    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
    HCursorOperations → GenericCursor
  18. def deleteRights: ACursor

    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
    HCursorOperations → GenericCursor
  19. def downArray: ACursor

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

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

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

    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
    HCursorOperations → GenericCursor
  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def failedACursor: ACursor

    Create a failed ACursor for this cursor.

  25. def field(k: String): ACursor

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

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

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

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

    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
    HCursorOperations → GenericCursor
  30. 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.

    Definition Classes
    HCursorOperations → GenericCursor
  31. def focus: Json

    The current location in the document.

    The current location in the document.

    Definition Classes
    HCursorOperations → GenericCursor
  32. def get[A](k: String)(implicit d: Decoder[A]): Xor[DecodingFailure, 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.

    Definition Classes
    HCursorOperations → GenericCursor
  33. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  34. val history: List[CursorOp]

  35. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  36. def last: ACursor

    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
    HCursorOperations → GenericCursor
  37. def left: ACursor

    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
    HCursorOperations → GenericCursor
  38. 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.

    If the focus is an element in a JSON array, move to the left until the given predicate matches the new focus.

    Definition Classes
    HCursorOperations → GenericCursor
  39. 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.

    Definition Classes
    HCursorOperations → GenericCursor
  40. def lefts: Option[List[Json]]

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

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

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

    Definition Classes
    AnyRef
  44. def right: ACursor

    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
    HCursorOperations → GenericCursor
  45. 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.

    If the focus is an element in a JSON array, move to the right until the given predicate matches the new focus.

    Definition Classes
    HCursorOperations → GenericCursor
  46. 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.

    Definition Classes
    HCursorOperations → GenericCursor
  47. def rights: Option[List[Json]]

    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
    HCursorOperations → GenericCursor
  48. def set(j: Json): HCursor

    Replace the focus.

    Replace the focus.

    Definition Classes
    GenericCursor
  49. def setLefts(js: List[Json]): ACursor

    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
    HCursorOperations → GenericCursor
  50. def setRights(js: List[Json]): ACursor

    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
    HCursorOperations → GenericCursor
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def top: Json

    Return to the root of the document.

    Return to the root of the document.

    Definition Classes
    HCursorOperations → GenericCursor
  53. def traverseDecode[A](init: A)(op: (HCursor) ⇒ ACursor, f: (A, HCursor) ⇒ Xor[DecodingFailure, A]): Xor[DecodingFailure, A]

    Traverse taking op at each step, performing f on the current cursor and accumulating A.

    Traverse taking op at each step, performing f on the current cursor and accumulating A.

    This operation does not consume stack at each step, so is safe to work with large structures (in contrast with recursively binding).

  54. def up: ACursor

    Move the focus to the parent.

    Move the focus to the parent.

    Definition Classes
    HCursorOperations → GenericCursor
  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def withFocus(f: (Json) ⇒ Json): HCursor

    Modify the focus using the given function.

    Modify the focus using the given function.

    Definition Classes
    HCursorOperations → GenericCursor
  59. def withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit arg0: Functor[F]): F[HCursor]

    Modify the focus in a context using the given function.

    Modify the focus in a context using the given function.

    Definition Classes
    HCursorOperations → GenericCursor

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from HCursorOperations

Inherited from GenericCursor[HCursor]

Inherited from AnyRef

Inherited from Any

Type members

HCursor fields and operations

Access and navigation

Modification

Array access

Object access

Array navigation

Object navigation

Array modification

Object modification

Decoding