Decoders

org.sigilaris.core.codec.json.JsonDecoder.configured.Decoders
final class Decoders(val config: JsonConfig) extends JsonDecoderInstances

Factory for decoder bundles bound to a specific JsonConfig.

Use this to override default behavior like field naming or null handling.

val cfg = JsonConfig.default.copy(treatAbsentAsNull = false)
given JsonDecoder.configured.Decoders = JsonDecoder.configured(cfg)

Attributes

Source
JsonDecoder.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

protected def mk[A](f: (JsonValue, JsonConfig) => Either[DecodeFailure, A]): JsonDecoder[A]

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
protected def typeMismatch[A](expected: String, got: JsonValue): Either[DecodeFailure, A]

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala

Concrete fields

Attributes

Source
JsonDecoder.scala

Givens

Inherited givens

given bigDecimalDecoder: JsonDecoder[BigDecimal]

Decodes BigDecimal from JString or JNumber depending on config.

Decodes BigDecimal from JString or JNumber depending on config.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given bigIntDecoder: JsonDecoder[BigInt]

Decodes BigInt from JString or JNumber depending on config.

Decodes BigInt from JString or JNumber depending on config.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given booleanDecoder: JsonDecoder[Boolean]

Decodes JBool to Boolean.

Decodes JBool to Boolean.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
inline given derivedProductDecoder[A](using m: ProductOf[A]): JsonDecoder[A]

Derives a decoder for product types (case classes) by decoding each field from a JObject.

Derives a decoder for product types (case classes) by decoding each field from a JObject.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
inline given derivedSumDecoder[A](using m: SumOf[A]): JsonDecoder[A]

Derives a decoder for sum types (sealed traits/enums) using wrapped-by-type-key discriminator.

Derives a decoder for sum types (sealed traits/enums) using wrapped-by-type-key discriminator.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given doubleDecoder: JsonDecoder[Double]

Decodes JNumber to Double.

Decodes JNumber to Double.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given instantDecoder: JsonDecoder[Instant]

Decodes Instant from ISO-8601 JString.

Decodes Instant from ISO-8601 JString.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given intDecoder: JsonDecoder[Int]

Decodes JNumber to Int.

Decodes JNumber to Int.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given listDecoder[A : JsonDecoder]: JsonDecoder[List[A]]

Decodes JArray to List.

Decodes JArray to List.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given longDecoder: JsonDecoder[Long]

Decodes JNumber to Long.

Decodes JNumber to Long.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given mapDecoder[K : JsonKeyCodec, V : JsonDecoder]: JsonDecoder[Map[K, V]]

Decodes JObject to Map by converting field names with JsonKeyCodec.

Decodes JObject to Map by converting field names with JsonKeyCodec.

Fails on key parse errors or duplicate decoded keys after normalization.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given optionDecoder[A : JsonDecoder]: JsonDecoder[Option[A]]

Decodes Option, treating JNull as None.

Decodes Option, treating JNull as None.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given stringDecoder: JsonDecoder[String]

Decodes JString to String.

Decodes JString to String.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala
given vectorDecoder[A : JsonDecoder]: JsonDecoder[Vector[A]]

Decodes JArray to Vector.

Decodes JArray to Vector.

Attributes

Inherited from:
JsonDecoderInstances
Source
JsonDecoder.scala