HCursor

io.circe.HCursor
See theHCursor companion object
abstract class HCursor(lastCursor: HCursor, lastOp: CursorOp) extends ACursor

Attributes

Companion:
object
Source:
HCursor.scala
Graph
Supertypes
class ACursor
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def addOp(cursor: HCursor, op: CursorOp): HCursor

Attributes

Source:
HCursor.scala
def replace(newValue: Json, cursor: HCursor, op: CursorOp): HCursor

Attributes

Source:
HCursor.scala
def value: Json

Attributes

Source:
HCursor.scala

Concrete methods

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

Attributes

Source:
HCursor.scala
final 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.

Attributes

Source:
HCursor.scala
final 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.

Attributes

Source:
HCursor.scala
final def find(p: Json => Boolean): ACursor

Attributes

Source:
HCursor.scala
final def focus: Option[Json]

The current location in the document.

The current location in the document.

Attributes

Source:
HCursor.scala
final def keys: Option[Iterable[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.

Attributes

Source:
HCursor.scala
final override def root: HCursor

Return the cursor to the root of the document.

Return the cursor to the root of the document.

Attributes

Definition Classes
Source:
HCursor.scala
final def succeeded: Boolean

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

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

Attributes

Source:
HCursor.scala
final def success: Option[HCursor]

Return the cursor as an HCursor if it was successful.

Return the cursor as an HCursor if it was successful.

Attributes

Source:
HCursor.scala
final def top: Option[Json]

Return to the root of the document.

Return to the root of the document.

Attributes

Source:
HCursor.scala
final def values: Option[Iterable[Json]]

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

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

Attributes

Source:
HCursor.scala
final def withFocus(f: Json => Json): ACursor

Modify the focus using the given function.

Modify the focus using the given function.

Attributes

Source:
HCursor.scala
final def withFocusM[F[_]](f: Json => F[Json])(implicit F: Applicative[F]): F[ACursor]

Modify the focus in a context using the given function.

Modify the focus in a context using the given function.

Attributes

Source:
HCursor.scala

Inherited methods

final def as[A](implicit d: Decoder[A]): Result[A]

Attempt to decode the focus as an A.

Attempt to decode the focus as an A.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

Delete the focus and move to its parent.

Delete the focus and move to its parent.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def failed: Boolean

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

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

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

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.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
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.

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

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
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. If the field k is missing, then use the fallback instead.

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.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def history: List[CursorOp]

The operations that have been performed so far.

The operations that have been performed so far.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

If the focus is a value in a JSON array, return the key.

If the focus is a value in a JSON array, return the key.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

If the focus is a value in a JSON object, return the key.

If the focus is a value in a JSON object, return the key.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

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.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def pathString: String

Creates a JavaScript-style path string, e.g. ".foo.bar[3]".

Creates a JavaScript-style path string, e.g. ".foo.bar[3]".

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def replay(history: List[CursorOp]): ACursor

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

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

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def replayOne(op: CursorOp): ACursor

Replay an operation against this cursor.

Replay an operation against this cursor.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala

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.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
final def set(j: Json): ACursor

Replace the focus.

Replace the focus.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala
def up: ACursor

Move the focus to the parent.

Move the focus to the parent.

Attributes

Inherited from:
ACursor
Source:
ACursor.scala