The keys in `value` that the context must define: bare terms only — JSON-LD keywords (`@id`, `@type`, …) need no term, and CURIEs (`prov:Activity`) resolve through their namespace prefix.
(value: &Value)
| 43 | /// JSON-LD keywords (`@id`, `@type`, …) need no term, and CURIEs (`prov:Activity`) |
| 44 | /// resolve through their namespace prefix. |
| 45 | pub fn undefined_terms(value: &Value) -> BTreeSet<String> { |
| 46 | let defined = defined_terms(); |
| 47 | let mut keys = BTreeSet::new(); |
| 48 | collect_keys(value, &mut keys); |
| 49 | keys.into_iter() |
| 50 | .filter(|k| !k.starts_with('@') && !k.contains(':')) |
| 51 | .filter(|k| !defined.contains(k)) |
| 52 | .collect() |
| 53 | } |
| 54 | |
| 55 | #[cfg(test)] |
| 56 | mod tests { |