(value: &Value)
| 607 | } |
| 608 | |
| 609 | fn as_object(value: &Value) -> Result<&Map<String, Value>> { |
| 610 | value |
| 611 | .as_object() |
| 612 | .ok_or_else(|| CanonicalError::Proof("document is not a JSON object".into())) |
| 613 | } |
| 614 | |
| 615 | fn expect_type(value: &Value, expected: &str) -> Result<()> { |
| 616 | let actual = as_object(value)?.get("@type").and_then(Value::as_str); |
no test coverage detected