pub fn u64_of(v: &Value, keys: &[&str]) -> Option<u64>Expand description
What: Extract an unsigned 64-bit integer by trying multiple keys and representations.
Inputs:
v: JSON value to extract from.keys: Array of candidate keys to try in order.
Output:
- Returns
Some(u64)if a valid value is found, orNoneif no usable value is found.
Details:
- Accepts any of the following representations for the first matching key:
- JSON
u64 - JSON
i64convertible tou64(must be positive) - String that parses as
u64
- JSON
- Tries keys in the order provided and returns the first match.