Skip to main content

set_system_parameter

Function set_system_parameter 

Source
pub fn set_system_parameter(
    config_json: &str,
    parameter_name: &str,
    parameter_value: &Value,
) -> Result<String>
Expand description

Set a system parameter

§Arguments

  • config_json - Configuration JSON string
  • parameter_name - Parameter name (e.g., “relationshipsBreakMatches”)
  • parameter_value - Parameter value

§Returns

Returns modified configuration JSON on success

§Example

use sz_configtool_lib::system_params;
use serde_json::json;

let config = r#"{"G2_CONFIG": {"CFG_RTYPE": [{"RCLASS_ID": 2, "BREAK_RES": 0}]}}"#;
let modified = system_params::set_system_parameter(config, "relationshipsBreakMatches", &json!(1)).unwrap();