pub fn as_json(&self) -> Option<serde_json::Value> {
        use serde_json::Value;
        match self {
            FlagValue::Bool(b) => Some(Value::from(*b)),
            FlagValue::Str(s) => Some(Value::from(s.as_str())),
            FlagValue::Number(f) => Some(Value::from(*f)),
            FlagValue::Json(v) => Some(v.clone()),
        }
    }
/// Attempts to convert the FlagValue into an arbitrary JSON representation, returning None if the
/// conversion is invalid.
Attempts to convert the FlagValue into an arbitrary JSON representation, returning None if the
conversion is invalid.
Attempts to convert the FlagValue into an arbitrary JSON representation returning None if the conversion is invalid .
pub fn as_json(&self) -> Option<serde_json::Value> {
        use serde_json::Value;
        match self {
            FlagValue::Bool(b) => Some(Value::from(*b)),
            FlagValue::Str(s) => Some(Value::from(s.as_str())),
            FlagValue::Number(f) => Some(Value::from(*f)),
            FlagValue::Json(v) => Some(v.clone()),
        }
    }
pub fn as_json ( & self ) -> Option < serde_json :: Value > { use serde_json :: Value ; match self { FlagValue :: Bool ( b ) => Some ( Value :: from ( * b ) ) , FlagValue :: Str ( s ) => Some ( Value :: from ( s . as_str ( ) ) ) , FlagValue :: Number ( f ) => Some ( Value :: from ( * f ) ) , FlagValue :: Json ( v ) => Some ( v . clone ( ) ) , } }
Attempts to convert the FlagValue into an arbitrary JSON representation, returning None if the
conversion is invalid.
Attempts to convert the FlagValue into an arbitrary JSON representation returning None if the conversion is invalid .
&self
&self