Added docs regarding support for ASDF with primitive optional.
Build and Deploy Documentation Site / build-and-deploy (push) Successful in 25s Details

This commit is contained in:
Andrew Lalis 2026-06-15 16:03:14 -04:00
parent 18adc293cb
commit 944b4ca48a
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ In addition to the basic HTTP types, the Primitives component provides some smal
The [`Optional`](ddoc/primitives/handy_http_primitives.optional.Optional.html) type is a simplified version of D's standard library `Nullable`, that provides some convenience methods for mapping the underlying data if it's present. The [`Optional`](ddoc/primitives/handy_http_primitives.optional.Optional.html) type is a simplified version of D's standard library `Nullable`, that provides some convenience methods for mapping the underlying data if it's present.
If you're also using the [ASDF](https://code.dlang.org/packages/asdf) library for JSON serialization and deserialization, you'll be happy to know that `Optional` supports it through custom serialization/deserialization functions to read and write optional values as though they were nullable.
### Multi-Value Map ### Multi-Value Map
The [`MultiValueMap`](ddoc/primitives/handy_http_primitives.multivalue_map.MultiValueMap.html) type defines a multi-valued mapping, where a key is mapped to an array of one or more values. The map is sorted by keys for `O(log(n))` lookup and retrieval, and `O(n*log(n))` insertion. The [`MultiValueMap`](ddoc/primitives/handy_http_primitives.multivalue_map.MultiValueMap.html) type defines a multi-valued mapping, where a key is mapped to an array of one or more values. The map is sorted by keys for `O(log(n))` lookup and retrieval, and `O(n*log(n))` insertion.