pub fn load_with_options<S: BnStrCompatible, O: IntoJson>(
    filename: S,
    update_analysis_and_wait: bool,
    options: Option<O>
) -> Option<Ref<BinaryView>>
Expand description

The main way to open and load files (with options) into Binary Ninja. Make sure you’ve properly initialized the core before calling this function. See crate::headless::init()

Strict JSON doesn't support single quotes for strings, so you'll need to either use a raw strings (f#"{"setting": "value"}"#) or escape double quotes ("{\"setting\": \"value\"}"). Or use serde_json::json.
use binaryninja::{metadata::Metadata, rc::Ref};
use std::collections::HashMap;

let bv = binaryninja::load_with_options("/bin/cat", true, Some(json!("analysis.linearSweep.autorun": false).to_string()))
    .expect("Couldn't open `/bin/cat`");