Attributes
- Companion
- class
- Source
- JsonCodec.scala
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonCodec.type
Members list
Type members
Classlikes
Configuration-bound codec bundles.
Configuration-bound codec bundles.
Attributes
- Source
- JsonCodec.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
configured.type
Inherited and Abstract types
The names of the product elements
The name of the type
Value members
Concrete methods
Derived JsonCodec using Mirror, enabling derives JsonCodec.
Derived JsonCodec using Mirror, enabling derives JsonCodec.
Supports both product types (case classes) and sum types (sealed traits).
case class Point(x: Int, y: Int) derives JsonCodec
sealed trait Shape derives JsonCodec
case class Circle(radius: Double) extends Shape
case class Rectangle(width: Double, height: Double) extends Shape
Attributes
- Source
- JsonCodec.scala
Builds a JsonCodec from explicit encoder and decoder.
Builds a JsonCodec from explicit encoder and decoder.
Value parameters
- dec
-
the decoder
- enc
-
the encoder
Attributes
- Returns
-
a JsonCodec wrapping both
- Source
- JsonCodec.scala
Alias of instance for conciseness.
Alias of instance for conciseness.
Value parameters
- dec
-
the decoder
- enc
-
the encoder
Attributes
- Returns
-
a JsonCodec wrapping both
- Source
- JsonCodec.scala
Givens
Givens
Automatic JsonCodec when both encoder and decoder are available.
Automatic JsonCodec when both encoder and decoder are available.
This given instance allows implicit summoning of a codec when both an encoder and decoder are in scope.
given JsonEncoder[MyType] = ...
given JsonDecoder[MyType] = ...
val codec = summon[JsonCodec[MyType]]
Attributes
- Source
- JsonCodec.scala