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.
Summary
Functions
Checks that every single-@ key of a dynamic object is a known
directive. Protocol versions before v1.0 have no reserved keys.
Whether key starts with a single @ (not the escaped @@).
Removes one @ from an escaped key ("@@path" → "@path").
Functions
@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.
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
Removes one @ from an escaped key ("@@path" → "@path").