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

Function stringify

src/framework/io/json.cpp:310–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308 throw std::runtime_error("json value is not a number");
309 }
310 return number_value_;
311}
312
313int64_t Value::as_i64() const {
314 const double value = as_number();
315 if (!std::isfinite(value) || std::floor(value) != value) {
316 throw std::runtime_error("json number is not an integer");
317 }
318 return static_cast<int64_t>(value);
319}
320
321float Value::as_f32() const {
322 return static_cast<float>(as_number());
323}
324
325const std::string & Value::as_string() const {
326 if (!is_string()) {

Callers 15

stringify_numberFunction · 0.85
stringify_stringFunction · 0.85
json_option_stringFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
option_textFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 3

make_cjsonFunction · 0.85
print_cjsonFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected