Skip to main content

json_option_value

Function json_option_value 

Source
pub fn json_option_value(text: &str, key: &str) -> Option<String>
Expand description

Returns an optional string field from JSON text.

§Parameters

§Returns

Returns Some when crate::runtime::json_commands::json_option_value can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::json_commands::json_option_value.

§Examples

ⓘ
let _result = pharos_native::runtime::json_commands::json_option_value("{}", "key");