MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / set_option_from_json_field

Function set_option_from_json_field

app/cli/request.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 const std::string & value) {
24 std::filesystem::path path(value);
25 return path.is_absolute() ? path : base_dir / path;
26}
27
28void set_option_from_json_field(
29 std::unordered_map<std::string, std::string> & options,
30 const engine::io::json::Value & object,
31 const std::string & field,
32 const std::string & option_key) {
33 const auto * value = object.find(field);
34 if (value != nullptr && !value->is_null()) {
35 set_option(options, option_key, json_option_string(*value));
36 }
37}

Callers 1

build_request_from_jsonFunction · 0.85

Calls 4

set_optionFunction · 0.85
json_option_stringFunction · 0.85
is_nullMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected