abstract class HCursor extends ACursor
- Source
- HCursor.scala
- Grouped
- Alphabetic
- By Inheritance
- HCursor
- ACursor
- Serializable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def addOp(cursor: HCursor, op: CursorOp): HCursor
-
abstract
def
delete: ACursor
Delete the focus and move to its parent.
Delete the focus and move to its parent.
- Definition Classes
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
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.
- Definition Classes
- ACursor
-
abstract
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
- ACursor
-
abstract
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
- ACursor
-
abstract
def
lefts: Option[Vector[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
- ACursor
- abstract def replace(newValue: Json, cursor: HCursor, op: CursorOp): HCursor
-
abstract
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
- ACursor
-
abstract
def
rights: Option[Vector[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
- ACursor
-
abstract
def
setLefts(x: Vector[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
- ACursor
-
abstract
def
setRights(x: Vector[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
- ACursor
-
abstract
def
up: ACursor
Move the focus to the parent.
Move the focus to the parent.
- Definition Classes
- ACursor
- abstract def value: Json
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (HCursor, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
.- Definition Classes
- ACursor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
downArray: ACursor
If the focus is a JSON array, move to its first element.
-
final
def
downAt(p: (Json) ⇒ Boolean): ACursor
If the focus is a JSON array, move to the first element that satisfies the given predicate.
-
final
def
downField(k: String): ACursor
If the focus is a JSON object, move to the value of the given key.
-
final
def
downN(n: Int): ACursor
If the focus is a JSON array, move to the element at the given index.
- def ensuring(cond: (HCursor) ⇒ Boolean, msg: ⇒ Any): HCursor
- def ensuring(cond: (HCursor) ⇒ Boolean): HCursor
- def ensuring(cond: Boolean, msg: ⇒ Any): HCursor
- def ensuring(cond: Boolean): HCursor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
fail(op: CursorOp): ACursor
Create a new cursor that has failed on the given operation.
Create a new cursor that has failed on the given operation.
- Attributes
- protected[this]
-
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.
- Definition Classes
- ACursor
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
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.
-
final
def
focus: Option[Json]
The current location in the document.
- def formatted(fmtstr: String): String
-
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
.- Definition Classes
- ACursor
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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 fieldk
is missing, then use thefallback
instead.- Definition Classes
- ACursor
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
history: List[CursorOp]
The operations that have been performed so far.
The operations that have been performed so far.
- Definition Classes
- ACursor
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
keys: Option[Iterable[String]]
If the focus is a JSON object, return its field names in their original order.
-
final
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.
-
final
def
leftN(n: Int): ACursor
If the focus is an element in JSON array, move to the left the given number of times.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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.
- Definition Classes
- ACursor
-
final
def
replayOne(op: CursorOp): ACursor
Replay an operation against this cursor.
Replay an operation against this cursor.
- Definition Classes
- ACursor
-
final
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.
-
final
def
rightN(n: Int): ACursor
If the focus is an element in JSON array, move to the right the given number of times.
-
final
def
set(j: Json): ACursor
Replace the focus.
Replace the focus.
- Definition Classes
- ACursor
-
final
def
succeeded: Boolean
Indicate whether this cursor represents the result of a successful operation.
-
final
def
success: Option[HCursor]
Return the cursor as an HCursor if it was successful.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
top: Option[Json]
Return to the root of the document.
-
final
def
values: Option[Iterable[Json]]
If the focus is a JSON array, return its elements.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
withFocus(f: (Json) ⇒ Json): ACursor
Modify the focus using the given function.
-
final
def
withFocusM[F[_]](f: (Json) ⇒ F[Json])(implicit F: Applicative[F]): F[ACursor]
Modify the focus in a context using the given function.
- def →[B](y: B): (HCursor, B)
This is the API documentation for circe, a JSON library for Scala and Scala.js.
The library is divided into a number of modules that either provide core functionality, support additional features via third-party dependencies, or facilitate integration with other libraries or frameworks.
Arbitrary
instances for circe's JSON AST and other types, as well as other useful testing tools.BitVector
andByteVector
.Please refer to the documentation for a more detailed introduction to the library.