pub fn edit(spec: &Spec, ops: &Value) -> Result<Spec, Invalid>Expand description
Applies edit operations to a spec. Each operation is {"op": "set" | "remove" | "add", "path": "a/b/c", "value": …}, with paths into the spec’s JSON; a / inside a key (a
dimension’s ID) is written ~1 and a ~ is written ~0, as in a JSON pointer (RFC 6901).
add appends its value to the list at its path; a note added without an ID takes the next
free n:<k>, a table the next free t:<k>. The result is validated whole, so an unknown field or a value of the wrong kind
is refused with the reason.