# `OCSF.Deserializer`
[🔗](https://github.com/docjerem/ocsf/blob/v0.1.0/lib/ocsf/deserializer.ex#L1)

Deserialization from OCSF-compliant nested maps back to structs.

Reconstructs an `%OCSF.Event{}` from the map shape `OCSF.to_map/1`
produces. Resolves `_name` strings back to UIDs via enum modules.

Prefer `OCSF.Event.from_map/1` over calling this module directly.

See `OCSF.Serializer`, `OCSF.Event`.

# `from_map`

```elixir
@spec from_map(map()) :: {:ok, OCSF.Event.t()} | {:error, OCSF.Error.t()}
```

Reconstruct an `%OCSF.Event{}` from a nested OCSF map.

Accepts both atom-keyed and string-keyed maps (e.g. from
`Jason.decode!/1`). Runs `OCSF.validate/1` after construction.

---

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