Class/Object

io.circe

Cursor

Related Docs: object Cursor | package circe

Permalink

abstract class Cursor extends CursorOperations

A zipper that represents a position in a JSON value and supports navigation around the JSON value.

The focus represents the current position of the cursor; it may be updated with withFocus or changed using the navigation methods left, right, etc.

See also

GenericCursor

Linear Supertypes
CursorOperations, GenericCursor[Cursor], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Cursor
  2. CursorOperations
  3. GenericCursor
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cursor()

    Permalink

Type Members

  1. type Focus[x] = x

    Permalink

    The context that the cursor is available in.

    The context that the cursor is available in.

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

    Permalink

    The type class including the operations needed for withFocusM.

    The type class including the operations needed for withFocusM.

    Definition Classes
    CursorOperations → GenericCursor
  3. type Result = Option[Cursor]

    Permalink

    The type returned by navigation and modifications operations.

    The type returned by navigation and modifications operations.

    Definition Classes
    CursorOperations → GenericCursor

Abstract Value Members

  1. abstract def context: List[Context]

    Permalink

    Return the current context of the focus.

  2. abstract def delete: Result

    Permalink

    Delete the focus and move to its parent.

    Delete the focus and move to its parent.

    Definition Classes
    GenericCursor
  3. abstract def focus: Focus[Json]

    Permalink

    The current location in the document.

    The current location in the document.

    Definition Classes
    GenericCursor
  4. abstract def up: Result

    Permalink

    Move the focus to the parent.

    Move the focus to the parent.

    Definition Classes
    GenericCursor
  5. abstract def withFocus(f: (Json) ⇒ Json): Cursor

    Permalink

    Modify the focus using the given function.

    Modify the focus using the given function.

    Definition Classes
    GenericCursor
  6. abstract def withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit arg0: M[F]): F[Cursor]

    Permalink

    Modify the focus in a context using the given function.

    Modify the focus in a context using the given function.

    Definition Classes
    GenericCursor

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

    Permalink

    Attempt to decode the focus as an A.

    Attempt to decode the focus as an A.

    Definition Classes
    CursorOperations → GenericCursor
  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. def deleteGoField(q: String): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  8. def deleteGoFirst: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  9. def deleteGoLast: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  10. def deleteGoLeft: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  11. def deleteGoRight: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  12. def deleteLefts: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  13. def deleteRights: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  14. def downArray: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  15. def downAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  16. def downField(k: String): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  17. def downN(n: Int): Option[Cursor]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def field(k: String): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  21. 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.

    Definition Classes
    CursorOperations → GenericCursor
  22. def fields: Option[List[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.

    Definition Classes
    CursorOperations → GenericCursor
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def find(p: (Json) ⇒ Boolean): Option[Cursor]

    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.

    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
    CursorOperations → GenericCursor
  25. def first: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  26. def get[A](k: String)(implicit d: Decoder[A]): Decoder.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.

    Definition Classes
    CursorOperations → GenericCursor
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hcursor: HCursor

    Permalink

    Create an HCursor for this cursor in order to track history.

  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. def last: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  32. def left: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  33. def leftAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  34. def leftN(n: Int): Option[Cursor]

    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.

    Definition Classes
    CursorOperations → GenericCursor
  35. def lefts: Option[List[Json]]

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  39. def right: Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  40. def rightAt(p: (Json) ⇒ Boolean): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  41. def rightN(n: Int): Option[Cursor]

    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.

    Definition Classes
    CursorOperations → GenericCursor
  42. def rights: Option[List[Json]]

    Permalink

    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
    CursorOperations → GenericCursor
  43. def set(j: Json): Cursor

    Permalink

    Replace the focus.

    Replace the focus.

    Definition Classes
    GenericCursor
  44. def setLefts(x: List[Json]): Option[Cursor]

    Permalink

    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
    CursorOperations → GenericCursor
  45. def setRights(x: List[Json]): Option[Cursor]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  48. def top: Json

    Permalink

    Return to the root of the document.

    Return to the root of the document.

    Definition Classes
    CursorOperations → GenericCursor
  49. final def wait(): Unit

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

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

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

Inherited from CursorOperations

Inherited from GenericCursor[Cursor]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Type members

Cursor fields and operations

Access and navigation

Modification

Array access

Object access

Array navigation

Object navigation

Array modification

Object modification

Decoding