# `A2UICore.Validation.ReservedKeys`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_core/lib/a2ui_core/validation/reserved_keys.ex#L1)

The v1.0 reserved-key rule for dynamic objects.

In v1.0 a key that starts with a single `@` is a protocol directive
(`@path`, `@call`). Any other `@`-prefixed key must be escaped by
doubling the prefix (`@@note` stands for the literal key `@note`);
`unescape/1` undoes that when a value is resolved.

# `check`
*since 0.1.0* 

```elixir
@spec check([String.t()], String.t() | nil) :: :ok | {:error, A2UICore.Error.t()}
```

Checks that every single-`@` key of a dynamic object is a known
directive. Protocol versions before v1.0 have no reserved keys.

# `directive_like?`
*since 0.1.0* 

```elixir
@spec directive_like?(String.t()) :: boolean()
```

Whether `key` starts with a single `@` (not the escaped `@@`).

    iex> A2UICore.Validation.ReservedKeys.directive_like?("@path")
    true
    iex> A2UICore.Validation.ReservedKeys.directive_like?("@@path")
    false

# `unescape`
*since 0.1.0* 

```elixir
@spec unescape(String.t()) :: String.t()
```

Removes one `@` from an escaped key (`"@@path"` → `"@path"`).

---

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