org.sigilaris.core.codec.json.JsonDecoder
See theJsonDecoder companion object
Type class for decoding the core JsonValue AST into Scala values.
Decoders use JsonConfig to interpret field naming, discriminator strategy, null/absent semantics, and big number representations.
Combinators map/emap help build validated or dependent decoders; derived provides automatic derivation for products and sums.
Attributes
- See also
-
JsonEncoder for the inverse operation
JsonCodec for bidirectional encoding and decoding
JsonConfig for configuration options
- Note
-
Decoding validates structure and types. Failures return org.sigilaris.core.failure.DecodeFailure with descriptive error messages.
- Example
-
case class User(name: String, age: Int) derives JsonDecoder val json = JsonValue.obj("name" -> JString("Alice"), "age" -> JNumber(30)) val user = JsonDecoder[User].decode(json) - Companion
- object
- Source
- JsonDecoder.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsonDecoder[A]
Members list
In this article