Expand description
Serde helper modules for common API wire-format patterns.
Each module is designed to be used with #[serde(with = "...")].
| Module | Use case |
|---|---|
json_string | Value ↔ stringified JSON ("{\"k\":\"v\"}") |
[base64_bytes] | Vec<u8> ↔ Base64 string (standard / URL-safe) |
timestamp | DateTime<Utc> from epoch or ISO 8601, as RFC 3339 |
maybe_string | String-or-number coerced to a target type |
Modules§
- json_
string - Serde module for fields that carry stringified JSON on the wire.
- maybe_
string - Serde module that accepts either a string or a number and coerces the
value to the target type via
core::str::FromStr. - timestamp
- Flexible timestamp serde: deserializes from Unix epoch (integer or float) or ISO 8601 / RFC 3339 string; always serializes as an RFC 3339 string.