# `RequestSeal.StructuredFields.Value`
[🔗](https://github.com/baselabs/request_seal/blob/v0.5.2/lib/request_seal/structured_fields/value.ex#L1)

Ordered Structured Fields data (RFC 9651 Section 3).

`:type` is `:item`, `:inner_list`, `:list`, or `:dictionary`. An item's `:value`
is a tagged bare item: `{:integer, n}`, `{:decimal, {coefficient, scale}}`,
`{:string, ascii}`, `{:token, ascii}`, `{:bytes, binary}`, `{:boolean, boolean}`,
`{:date, unix_seconds}`, or `{:display_string, utf8}`. Decimals are exact base-10
values, coefficient / 10^scale; floats are not accepted. Serialization rounds
to three places with ties to even. Scale is bounded to 18 and coefficient
magnitude to 10^30 - 1 before arithmetic.

Lists and inner lists contain ordered Values. Dictionaries contain ordered
`{key, Value}` pairs. Parameters are ordered `{key, bare_item}` pairs on items
and inner lists only. Parsing duplicates keeps the first key position and the
last value, as the RFC requires. Hand-constructed duplicates reject during
serialization. Inner lists cannot nest. Inspection omits values; access them
explicitly. This structure establishes no authentication or authorization.

# `bare`

```elixir
@type bare() ::
  {:integer, integer()}
  | {:decimal, {integer(), 0..18}}
  | {:string | :token | :bytes | :display_string, binary()}
  | {:boolean, boolean()}
  | {:date, integer()}
```

# `t`

```elixir
@type t() :: %RequestSeal.StructuredFields.Value{
  parameters: [{binary(), bare()}],
  type: :item | :inner_list | :list | :dictionary,
  value: bare() | [t()] | [{binary(), t()}]
}
```

---

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