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

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