Skip to main content

parse_value_for

Function parse_value_for 

Source
pub fn parse_value_for(key: ConfigKey, input: &str) -> Result<Value>
Expand description

Parse a user-typed string into the JSON value ConfigKey expects.

Strings stay strings; booleans accept true/false; numbers parse via serde_json; args accepts a JSON array literal or a space-separated shell-ish list. Empty string means “unset” — the caller decides whether to remove the field or leave it default.