Dowser. Client. Codecs. DefaultCodec
(Dowser.Client v0.1.0)
View Source
The built-in, backend-agnostic Dowser.Client.Codec.
decode/2 applies opts[:key_fn] (resolved from :keys by
Dowser.Client.Request) to every key of the decoded body via
Dowser.CoreExt.Keyable.transform_keys/2 — recursively, through maps,
lists and MapSets (an ndjson body decodes to a list of maps, so the
transform must recurse into it too, not just top-level maps). Any other
term (a scalar, nil, ...) passes through unchanged.
encode/2 does no casting of its own — dowser_client has no
backend-specific value-casting knowledge; see Dowser.Client.Codec.