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

Function json_optional_string

app/cli/request.cpp:71–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 if (value.is_bool()) {
70 return value.as_bool() ? "true" : "false";
71 }
72 if (value.is_number()) {
73 return engine::io::json::stringify_number(value.as_number());
74 }
75 return engine::io::json::stringify(value);
76}
77
78std::unordered_map<std::string, std::string> json_options_map(const engine::io::json::Value * value) {
79 std::unordered_map<std::string, std::string> options;
80 if (value == nullptr || value->is_null()) {
81 return options;
82 }

Callers 2

build_request_from_jsonFunction · 0.85

Calls 2

is_nullMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected