Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

convenienve ACursor#jdecode

  • Loading branch information...
commit 546dfb1112b432e308e95a3b4da4d2d16ba3dae0 1 parent 5213a56
markhibberd authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/scala/com/ephox/argonaut/ACursor.scala
View
8 src/main/scala/com/ephox/argonaut/ACursor.scala
@@ -12,6 +12,12 @@ sealed trait ACursor {
import CursorOp._
import Json._
+ /**
+ * Attempts to decode this cursor focus value to another data type.
+ */
+ def jdecode[A](implicit e: DecodeJson[A]): DecodeResult[A] =
+ hcursor.jdecode[A]
+
def failed: Boolean =
!succeeded
@@ -262,4 +268,4 @@ trait ACursors {
val acursorSucceededL: ACursor @> Boolean =
Lens(c => Store(build(c.hcursor, _), c.succeeded))
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.