Compile-time generated codecs for JSON-shaped Elixir structs.
JSONCodec is not a JSON parser. It uses Jason for JSON parsing and focuses on
the part application code usually repeats by hand: turning decoded string-keyed maps
into nested structs with defaults, aliases, computed fields, explicit atom policy, and
schema export.
Summary
Functions
Decodes a JSON string into module.
Decodes a JSON string into module, raising on failure.
Builds module from a decoded JSON map.
Builds module from a decoded JSON map, raising on failure.
Returns a JSON Schema-compatible schema map for a JSONCodec module.
Converts a struct or value into JSON-shaped Elixir data.
Functions
Decodes a JSON string into module.
Decodes a JSON string into module, raising on failure.
Builds module from a decoded JSON map.
Builds module from a decoded JSON map, raising on failure.
Returns a JSON Schema-compatible schema map for a JSONCodec module.
Converts a struct or value into JSON-shaped Elixir data.