Expand description
§Utility Functions Module
Path-based read/write helpers for the datavalue::OwnedDataValue tree
that backs Message::context. The same dot-path syntax that worked on
serde_json::Value works here unchanged — including #-prefix escapes
for numeric object keys.
Functions§
- get_
nested_ value - Get a reference to the value at
path, walking the tree. - get_
nested_ value_ cloned - Clone the value at
path, returningNoneif the path is unresolvable. - get_
nested_ value_ parts - Same as
get_nested_valuebut consumes a pre-split slice of path parts. Parts retain the original#prefix;strip_hash_prefixis applied at lookup time so the#20→ “force object key 20” semantics still hold. - set_
nested_ value - Set the value at
path, creating intermediate containers as needed. - set_
nested_ value_ parts - Same as
set_nested_valuebut consumes a pre-split slice of path parts. Parts retain the original#prefix;strip_hash_prefixis applied at use time. Crucially, the “is the NEXT segment an array index?” decision looks at the raw (unstripped)parts[i+1]—#20parses as non-numeric, so the child container is an Object (key “20”), not an Array.