Skip to main content

build_rows

Function build_rows 

Source
pub fn build_rows(
    root: &Value,
    collapsed: &HashSet<Vec<Seg>>,
    hidden_top_level: &HashSet<String>,
) -> Vec<Row>
Expand description

Build the flat row list from a document root, honoring the collapsed set (paths whose containers are collapsed) and a set of top-level mapping keys to hide.

Hiding is scoped to the root map’s own entries — a nested key that happens to share a hidden name is untouched. The hidden entries stay in the underlying Value (and therefore in the document’s bytes); they merely produce no row. This is how a consumer whose format reserves some top-level keys (e.g. prov’s managed frontmatter — id, prov, contents, …) keeps them lossless while showing the user only their own fields. Because only the projection is filtered — never the Value itself — sibling reorders still see the full key order and leave the hidden keys in place.