Skip to main content

values_as_array

Function values_as_array 

Source
pub fn values_as_array(
    container: Container,
    item_active_property: &str,
    compact_arrays: bool,
) -> bool
Expand description

Checks whether the values of a property are written as an array even when there is only one.

item_active_property is the term the property compacted to and container that term’s container mapping in the active context, or Container::None when the term has no definition. Follows the as array rule the compaction algorithm applies to each value of a property: true when the container mapping includes @set, when the term is @graph or @list, or when compact_arrays is off.

A term whose container mapping includes @list writes a list object’s items as an array regardless, and terms with an @language, @index, @id or @type container write a map whose entries this flag applies to.