From 944b4ca48ab00f62b33239c5bd3d9b7e228506eb Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Mon, 15 Jun 2026 16:03:14 -0400 Subject: [PATCH] Added docs regarding support for ASDF with primitive optional. --- docs/primitives.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/primitives.md b/docs/primitives.md index 858be96..4cc5ae0 100644 --- a/docs/primitives.md +++ b/docs/primitives.md @@ -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. +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 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.