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

Function parse

src/framework/io/json.cpp:282–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281bool Value::is_string() const noexcept {
282 return kind_ == Kind::String;
283}
284
285bool Value::is_array() const noexcept {
286 return kind_ == Kind::Array;
287}
288
289bool Value::is_object() const noexcept {
290 return kind_ == Kind::Object;
291}
292
293bool Value::as_bool() const {
294 if (!is_bool()) {
295 throw std::runtime_error("json value is not a bool");
296 }
297 return bool_value_;
298}
299
300double Value::as_number() const {
301 if (!is_number()) {
302 throw std::runtime_error("json value is not a number");
303 }
304 return number_value_;
305}
306
307int64_t Value::as_i64() const {

Callers 15

parse_fileFunction · 0.85
parse_flat_json_objectFunction · 0.85
option_string_listFunction · 0.85
parse_jsonc_fileFunction · 0.85
handle_speechMethod · 0.85
handle_generic_runMethod · 0.85
parse_requestsFunction · 0.85
warmup_requestFunction · 0.85
parse_requestsFunction · 0.85
parse_requestsFunction · 0.85
mainFunction · 0.85

Calls 6

convert_cjsonFunction · 0.85
cJSON_DeleteFunction · 0.85
to_stringFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected