(value: &Value)
| 572 | } |
| 573 | |
| 574 | fn as_object(value: &Value) -> Result<&Map<String, Value>> { |
| 575 | value |
| 576 | .as_object() |
| 577 | .ok_or_else(|| CanonicalError::Proof("document is not a JSON object".into())) |
| 578 | } |
| 579 | |
| 580 | fn expect_type(value: &Value, expected: &str) -> Result<()> { |
| 581 | let actual = as_object(value)?.get("@type").and_then(Value::as_str); |
no test coverage detected