Skip to main content

object_mut

Function object_mut 

Source
pub fn object_mut<'v>(
    value: &'v mut Value,
    path: &'static [&'static str],
) -> Result<&'v mut Map<String, Value>, ShapeError>
Expand description

The map at path inside value, creating every absent or null step as {}.

path is relative to value; the empty path is value itself.

§Errors

ShapeError::Wrong naming the first step (or value itself) that holds something other than an object or null. Nothing is written at or below that step.