Codecs
Value parameters
- dec
-
the configured decoder bundle
- enc
-
the configured encoder bundle
Attributes
- Source
- JsonCodec.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Exports
Defined exports
Decodes BigDecimal from JString or JNumber depending on config.
Encodes BigDecimal as JString or JNumber depending on config.
Decodes BigInt from JString or JNumber depending on config.
Encodes BigInt as JString or JNumber depending on config.
Decodes JBool to Boolean.
Encodes Boolean as JBool.
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
- Source
- JsonDecoder.scala
Derives an encoder for product types (case classes) by encoding each field into a JObject.
Derives an encoder for product types (case classes) by encoding each field into a JObject.
Attributes
- Source
- JsonEncoder.scala
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
- Source
- JsonDecoder.scala
Derives an encoder for sum types (sealed traits/enums) using wrapped-by-type-key discriminator.
Derives an encoder for sum types (sealed traits/enums) using wrapped-by-type-key discriminator.
Attributes
- Source
- JsonEncoder.scala
Decodes JNumber to Double.
Encodes Double as JNumber.
Decodes Instant from ISO-8601 JString.
Encodes Instant as ISO-8601 string truncated to milliseconds.
Decodes JNumber to Int.
Encodes Int as JNumber.
Decodes JArray to List.
Encodes List as JArray.
Decodes JNumber to Long.
Encodes Long as JNumber.
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
- Source
- JsonDecoder.scala
Encodes Map as JObject by converting keys with JsonKeyCodec to field names.
Encodes Map as JObject by converting keys with JsonKeyCodec to field names.
Attributes
- Source
- JsonEncoder.scala
Decodes Option, treating JNull as None.
Encodes Option as the encoded inner value or JNull for None.
Decodes JString to String.
Encodes String as JString.
Decodes JArray to Vector.
Encodes Vector as JArray.