# `JSONCodec`
[🔗](https://github.com/dannote/json_codec/blob/main/lib/json_codec.ex#L1)

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.

# `codec`
*macro* 

# `computed`
*macro* 

# `decode`

Decodes a JSON string into `module`.

# `decode!`

Decodes a JSON string into `module`, raising on failure.

# `defstruct`
*macro* 

# `dump`

Dumps a value into JSON-shaped Elixir data, respecting JSONCodec field names.

# `from_map`

Builds `module` from a decoded JSON map.

# `from_map!`

Builds `module` from a decoded JSON map, raising on failure.

# `json_schema`

Returns a JSON Schema-compatible schema map for a JSONCodec module.

# `schema`

Returns a JSON Schema-compatible schema map for a JSONCodec module.

# `to_map`

Converts a struct or value into JSON-shaped Elixir data.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
