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

Serialization helpers for OCSF events and nested objects.

Converts `%OCSF.Event{}` and nested structs into OCSF-compliant
nested maps. Resolves enum UIDs to their human-readable `_name`
labels per OCSF convention.

Prefer `OCSF.to_map/1` over calling this module directly.

See `OCSF.Event`, `OCSF.Metadata`.

# `to_map`

```elixir
@spec to_map(OCSF.Event.t()) :: map()
```

Convert an `%OCSF.Event{}` to an OCSF-compliant nested map.

Nil fields are omitted. Integer UIDs are emitted as-is; their
corresponding `_name` labels are added alongside.

---

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