Skip to main content

expect_array

Function expect_array 

Source
pub fn expect_array<'a>(
    value: &'a Value,
    path: &Path,
) -> Result<&'a [Value], DecodeError>
Expand description

Reads a non-empty JSON array.

ยงErrors

Returns DecodeError when value is not an array or is empty.