sealed abstract class CodecJson[A] extends EncodeJson[A] with DecodeJson[A]
- Self Type
- CodecJson[A]
- Source
- CodecJson.scala
- Alphabetic
- By Inheritance
- CodecJson
- DecodeJson
- EncodeJson
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract val Decoder: DecodeJson[A]
- abstract val Encoder: EncodeJson[A]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&&&[B](x: DecodeJson[B]): DecodeJson[(A, B)]
Combine two decoders.
Combine two decoders.
- Definition Classes
- DecodeJson
-
def
<&>[B](x: ⇒ EncodeJson[B]): EncodeJson[Either[A, B]]
Split on this encoder and the given encoder.
Split on this encoder and the given encoder.
- Definition Classes
- EncodeJson
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(c: HCursor): DecodeResult[A]
Decode the given hcursor.
Decode the given hcursor. Alias for
decode
.- Definition Classes
- DecodeJson
-
def
apply(a: A): Json
Encode the given value.
Encode the given value. Alias for
encode
.- Definition Classes
- EncodeJson
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
contramap[B](f: (B) ⇒ A): EncodeJson[B]
Contravariant functor.
Contravariant functor.
- Definition Classes
- EncodeJson
-
def
decode(c: HCursor): DecodeResult[A]
Decode the given hcursor.
Decode the given hcursor.
- Definition Classes
- CodecJson → DecodeJson
-
def
decodeJson(j: Json): DecodeResult[A]
Decode the given json.
Decode the given json.
- Definition Classes
- DecodeJson
-
def
encode(a: A): Json
Encode the given value.
Encode the given value.
- Definition Classes
- CodecJson → EncodeJson
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ DecodeJson[B]): DecodeJson[B]
Monad.
Monad.
- Definition Classes
- DecodeJson
-
def
flatMapCursor(f: (HCursor) ⇒ DecodeResult[HCursor]): DecodeJson[A]
Transform the incoming HCursor to produce another DecodeJson instance.
Transform the incoming HCursor to produce another DecodeJson instance.
- Definition Classes
- DecodeJson
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B](f: (A) ⇒ B): DecodeJson[B]
Covariant functor.
Covariant functor.
- Definition Classes
- DecodeJson
-
def
mapJson(f: (Json) ⇒ Json): EncodeJson[A]
Transform the resulting Json instance.
Transform the resulting Json instance.
- Definition Classes
- EncodeJson
-
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()
-
def
product[B](x: DecodeJson[B]): (HCursor, HCursor) ⇒ DecodeResult[(A, B)]
Run two decoders.
Run two decoders.
- Definition Classes
- DecodeJson
-
def
setName(n: String): CodecJson[A]
Build a new DecodeJson codec with the specified name.
Build a new DecodeJson codec with the specified name.
- Definition Classes
- CodecJson → DecodeJson
-
def
split[B](x: DecodeJson[B]): (Either[HCursor, HCursor]) ⇒ DecodeResult[Either[A, B]]
Run one or another decoder.
Run one or another decoder.
- Definition Classes
- DecodeJson
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryDecode(c: ACursor): DecodeResult[A]
Decode the given acursor.
Decode the given acursor.
- Definition Classes
- CodecJson → DecodeJson
-
def
validate(f: (HCursor) ⇒ Boolean, message: ⇒ String): DecodeJson[A]
Build a new DecodeJson codec with the specified precondition that f(c) == true.
Build a new DecodeJson codec with the specified precondition that f(c) == true.
- Definition Classes
- DecodeJson
-
def
validateFields(n: Int): DecodeJson[A]
Build a new DecodeJson codec with the precondition that the cursor focus is object with exactly n field.
Build a new DecodeJson codec with the precondition that the cursor focus is object with exactly n field.
- Definition Classes
- DecodeJson
-
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
- @throws( ... ) @native()
-
def
widen[AA]()(implicit ev: <:<[A, AA]): DecodeJson[AA]
Widen A into AA.
Widen A into AA.
- Definition Classes
- DecodeJson
- def xmap[B](f: (A) ⇒ B)(g: (B) ⇒ A): CodecJson[B]
-
def
|||[B, AA](x: ⇒ DecodeJson[B])(implicit evA: <:<[A, AA], evB: <:<[B, AA]): DecodeJson[AA]
Choose the first succeeding decoder.
Choose the first succeeding decoder.
- Definition Classes
- DecodeJson