Skip to main content

extract_string

Function extract_string 

Source
pub fn extract_string(
    value: &Value,
    field_name: &str,
) -> Result<String, ClaimsError>
Expand description

Helper to extract string from JSON value.

ยงErrors

Returns ClaimsError::InvalidClaimFormat if the value is not a string.