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

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