parse_json_array_number

Function parse_json_array_number 

Source
pub fn parse_json_array_number(
    name: &str,
    index: usize,
    array_value: &JsonValue,
) -> Result<f64, RpcError>
Expand description

Parses the element at the specified index in a JsonValue::Array into an f64 (compatible with JsonValue::Number). Returns the number if successful, or an error if the parameter is missing, not an array, or is not a valid number.