Packages

trait AsObject[A] extends AsRoot[A] with Encoder.AsObject[A]

Linear Supertypes
Encoder.AsObject[A], AsRoot[A], Encoder.AsRoot[A], Codec[A], Encoder[A], Decoder[A], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsObject
  2. AsObject
  3. AsRoot
  4. AsRoot
  5. Codec
  6. Encoder
  7. Decoder
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(c: HCursor): Result[A]

    Decode the given HCursor.

    Decode the given HCursor.

    Definition Classes
    Decoder
  2. abstract def encodeObject(a: A): JsonObject

    Convert a value to a JSON object.

    Convert a value to a JSON object.

    Definition Classes
    AsObject

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def apply(a: A): Json

    Convert a value to JSON.

    Convert a value to JSON.

    Definition Classes
    AsObjectEncoder
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. final def at(field: String): Decoder[A]

    Create a new decoder that attempts to navigate to the specified field before decoding.

    Create a new decoder that attempts to navigate to the specified field before decoding.

    Definition Classes
    Decoder
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def contramap[B](f: (B) ⇒ A): Encoder[B]

    Create a new Encoder by applying a function to a value of type B before encoding as an A.

    Create a new Encoder by applying a function to a value of type B before encoding as an A.

    Definition Classes
    Encoder
  9. final def contramapObject[B](f: (B) ⇒ A): Encoder.AsObject[B]

    Create a new AsObject by applying a function to a value of type B before encoding as an A.

    Create a new AsObject by applying a function to a value of type B before encoding as an A.

    Definition Classes
    AsObject
  10. def decodeAccumulating(c: HCursor): AccumulatingResult[A]
    Definition Classes
    Decoder
  11. final def decodeJson(j: Json): Result[A]

    Decode the given Json value.

    Decode the given Json value.

    Definition Classes
    Decoder
  12. final def either[B](decodeB: Decoder[B]): Decoder[Either[A, B]]

    Choose the first succeeding decoder, wrapping the result in a disjunction.

    Choose the first succeeding decoder, wrapping the result in a disjunction.

    Definition Classes
    Decoder
  13. final def emap[B](f: (A) ⇒ Either[String, B]): Decoder[B]

    Create a new decoder that performs some operation on the result if this one succeeds.

    Create a new decoder that performs some operation on the result if this one succeeds.

    f

    a function returning either a value or an error message

    Definition Classes
    Decoder
  14. final def emapTry[B](f: (A) ⇒ Try[B]): Decoder[B]

    Create a new decoder that performs some operation on the result if this one succeeds.

    Create a new decoder that performs some operation on the result if this one succeeds.

    f

    a function returning either a value or an error message

    Definition Classes
    Decoder
  15. final def ensure(errors: (A) ⇒ List[String]): Decoder[A]

    Build a new instance that fails with one or more errors if the condition does not hold for the result.

    Build a new instance that fails with one or more errors if the condition does not hold for the result.

    If the result of the function applied to the decoded value is the empty list, the new decoder will succeed with that value.

    Definition Classes
    Decoder
  16. final def ensure(pred: (A) ⇒ Boolean, message: ⇒ String): Decoder[A]

    Build a new instance that fails if the condition does not hold for the result.

    Build a new instance that fails if the condition does not hold for the result.

    Note that in the case of chained calls to this method, only the first failure will be returned.

    Definition Classes
    Decoder
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def flatMap[B](f: (A) ⇒ Decoder[B]): Decoder[B]

    Monadically bind a function over this Decoder.

    Monadically bind a function over this Decoder.

    Definition Classes
    Decoder
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def handleErrorWith(f: (DecodingFailure) ⇒ Decoder[A]): Decoder[A]

    Create a new instance that handles any of this instance's errors with the given function.

    Create a new instance that handles any of this instance's errors with the given function.

    Note that in the case of accumulating decoding, only the first error will be used in recovery.

    Definition Classes
    Decoder
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def kleisli: Kleisli[Result, HCursor, A]

    Convert to a Kleisli arrow.

    Convert to a Kleisli arrow.

    Definition Classes
    Decoder
  26. final def map[B](f: (A) ⇒ B): Decoder[B]

    Map a function over this Decoder.

    Map a function over this Decoder.

    Definition Classes
    Decoder
  27. final def mapJson(f: (Json) ⇒ Json): Encoder[A]

    Create a new Encoder by applying a function to the output of this one.

    Create a new Encoder by applying a function to the output of this one.

    Definition Classes
    Encoder
  28. final def mapJsonObject(f: (JsonObject) ⇒ JsonObject): Encoder.AsObject[A]

    Create a new AsObject by applying a function to the output of this one.

    Create a new AsObject by applying a function to the output of this one.

    Definition Classes
    AsObject
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def or[AA >: A](d: ⇒ Decoder[AA]): Decoder[AA]

    Choose the first succeeding decoder.

    Choose the first succeeding decoder.

    Definition Classes
    Decoder
  33. final def prepare(f: (ACursor) ⇒ ACursor): Decoder[A]

    Create a new decoder that performs some operation on the incoming JSON before decoding.

    Create a new decoder that performs some operation on the incoming JSON before decoding.

    Definition Classes
    Decoder
  34. final def product[B](fb: Decoder[B]): Decoder[(A, B)]

    Run two decoders and return their results as a pair.

    Run two decoders and return their results as a pair.

    Definition Classes
    Decoder
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. def tryDecode(c: ACursor): Result[A]

    Decode the given ACursor.

    Decode the given ACursor.

    Note that if you override the default implementation, you should also be sure to override tryDecodeAccumulating in order for fail-fast and accumulating decoding to be consistent.

    Definition Classes
    Decoder
  38. def tryDecodeAccumulating(c: ACursor): AccumulatingResult[A]
    Definition Classes
    Decoder
  39. final def validate(pred: (HCursor) ⇒ Boolean, message: ⇒ String): Decoder[A]

    Build a new instance that fails if the condition does not hold for the input.

    Build a new instance that fails if the condition does not hold for the input.

    Note that this condition is checked before decoding with the current decoder, and if it does not hold, decoding does not continue. This means that if you chain calls to this method, errors will not be accumulated (instead only the error of the last failing validate in the chain will be returned).

    Definition Classes
    Decoder
  40. final def validate(errors: (HCursor) ⇒ List[String]): Decoder[A]

    Build a new instance that fails if the condition does not hold for the input.

    Build a new instance that fails if the condition does not hold for the input.

    Note that this condition is checked before decoding with the current decoder, and if it does not hold, decoding does not continue. This means that if you chain calls to this method, errors will not be accumulated (instead only the error of the last failing validate in the chain will be returned).

    Definition Classes
    Decoder
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def withErrorMessage(message: String): Decoder[A]

    Build a new instance with the specified error message.

    Build a new instance with the specified error message.

    Definition Classes
    Decoder

Deprecated Value Members

  1. final def accumulating(c: HCursor): AccumulatingResult[A]
    Definition Classes
    Decoder
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use decodeAccumulating

Inherited from Encoder.AsObject[A]

Inherited from AsRoot[A]

Inherited from Encoder.AsRoot[A]

Inherited from Codec[A]

Inherited from Encoder[A]

Inherited from Decoder[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped