pub fn compact_array(
active_ctx: &JsonLdContext,
active_property: &str,
array: &[JsonLdValue],
options: &CompactionOptions,
) -> Result<JsonLdValue, CompactionError>Expand description
Compact an array of JSON-LD values.
If compact_arrays=true and the array has exactly one element, and the
active property’s container does not require an array, the element is
returned unwrapped (as a scalar).
§Arguments
active_ctx— the active contextactive_property— the property under which this array appearsarray— the array elements to compactoptions— compaction options